|
I don't know what I am doing wrong to get the reports to work. I can build the reports, placing the connection string into the report itself and it works. But I can not pass a connection string to the report. I need an example to build from.
|
|
|
|
|
Can somebody give me the C# Compiler rules file? I'm using Visual C++ 2008 Express Edition, and I have the C# Compiler v3.5 for .NET 3.5. I want to be able to compile C# source files in my IDE.
Replies and Questions are welcome
|
|
|
|
|
AFAIK M$ deliberately 'cripple' the express editions to prevent you from doing this. Some one might know different, but I think that is correct.
You could always download Visual C# Express, compile your code to a Library with it and add a reference to your C++ solution. At a pinch, you could compile it from the command line using csc.exe (the C# compiler, a quick google will give you the appropriate parameters).
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Not sure I understand what you want.
the C# compiler is part of .NET, not Visual Studio.
it could be found as C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe
(the exact path depends on your .NET version).
and the csc help appears when giving "csc /?" at the "DOS prompt"
|
|
|
|
|
I know that! I copied the C# Compiler to the bin folder at Visual C++ root. What I'm talking about is about a file of extension ".rules" that contains the rules for compiling the sources files like the rules file for compiling ".asm" files
|
|
|
|
|
I don't have a rules file on my disk, and yet I compile C# code every day.
And I wouldn't know what would be "rules" for a compiler. Also I don't see "rules" mentioned
anywhere in the CSC help. Can you give some examples?
|
|
|
|
|
|
OK, that is new to me. I created my own IDE for C and C#, for C# it calls csc.exe directly, and for C it uses third-party compilers, not MS ones. That's how I never encountered rules.
Looking here[^] I see rules stuff in the Visual Studio C++ branch, not in the C# branch.
And I don't see much use for such rules thing in a C# environment, where code is always managed code and gets translated into IL instructions, without calling on other tools.
|
|
|
|
|
I think it's better to do a custom build step to all C# source files
|
|
|
|
|
I have no more problems. I've just downloaded a C# Editor similar to Visual C#, with form editor too, since the Visual C# is installed throw the internet instead of being installed from the full package.
I've downloaded it here[^]
|
|
|
|
|
Hmm... how about downloading Visual C# Express Edition ?
You can install both C# and C++ Express Edition.
|
|
|
|
|
That should be included with Visual C# 2008 Express - install that, and find the files you want.
I presume you want to hack it so that you can use C++ and C# projects together in a single solution, rather than having to have the two IDEs open separately?
|
|
|
|
|
I'm fine for now. I've just downloaded a nice substitute of Visual C# - SharpDevelop, and I can use it to make Visual C# projects and solutions
|
|
|
|
|
I don't need anymore the C# Rules File because I have now the Visual C# 2008 Express Edition.
Thanks for your help.
|
|
|
|
|
I was able to get my code to work with the following, but it seems inefficient. Isn't this code calling the database multiple times to get objects before an insert. Anyone know the correct way to do this or have a link with a good example?
int baRequestTypeId = int.Parse(this.rblMode.SelectedValue);
int baAssociateTypeId = int.Parse(this.rcbAssociateType.SelectedValue);
int baBusinessTypeId = int.Parse(this.rcbBusinessType.SelectedValue);
SqlData.BusinessAssociateWorkFlowData dataContext = new BusinessAssociateWorkFlow.SqlData.BusinessAssociateWorkFlowData();
SqlData.BusinessAssociateContactChangeRequest baContact = new BusinessAssociateWorkFlow.SqlData.BusinessAssociateContactChangeRequest();
SqlData.RequestType baRequestType = (from r in dataContext.RequestType
where r.RequestTypeId == baRequestTypeId
select r).First();
SqlData.BusinessAssociateType baBusinessAssociateType = (from b in dataContext.BusinessAssociateType
where b.BusinessAssociateTypeId == baAssociateTypeId
select b).First();
SqlData.BusinessType baBusinessType = (from b in dataContext.BusinessType
where b.BusinessTypeId == baBusinessTypeId
select b).First();
baContact.RequestType = baRequestType;
baContact.BusinessAssociateType = baBusinessAssociateType;
baContact.BusinessType = baBusinessType;
baContact.Name = this.rtbName.Text;
baContact.Abbreviation = this.rtbAbbreviation.Text;
baContact.Code = this.rtbCode.Text;
baContact.CreatedBy = User.Identity.Name;
baContact.CreatedOn = DateTime.Now;
baContact.LastModifiedBy = User.Identity.Name;
baContact.LastModifiedOn = DateTime.Now;
baContact.ContactAddress.Add(this.AddressCntrl1.GetContactAddressEntity(ref dataContext));
dataContext.SaveChanges();
I didn't get any requirements for the signature
|
|
|
|
|
It is extremely rude to delete your previous message and repost it to another forum, especially when responses have already been given. The damage was done by originally posting to the incorrect forum, now no one will have the context of what has already been tried and the benefit of the other responses.
See here[^]
6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If anything delete this post and continue in the previous context.
only two letters away from being an asset
|
|
|
|
|
OK sorry. My fault. I didn't want to post it in many places and I thought you were done trying to help me. Thanks your help earlier though.
I didn't get any requirements for the signature
|
|
|
|
|
Dear friends
I am using lucene.net 2.3.2 for indexing, but I am facing memory leakage problem in many methods(GetPosting(Posting []), AddPosition(Token), ProcessDocument(Analyzer) etc) using dotTrace profiler. How do I solve this problem? Can anybody say in which version of lucene.net, no memory leakage problem occurs?
Thanks in advance Susanta
|
|
|
|
|
If no one answers your question, you might be better off asking in their forums here[^], scroll to the bottom to see how.
[Edit]
I found this[^] thread which discusses the problem by googling lucene.net memory leaks, perhaps you could give it a go while you are waiting.
[/Edit]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
You can submit[^] a site by doing a "POST".
|
|
|
|
|
|
Hi All,
I'm using System.Diagnostics.Process for running a background task, from which i need to read the standard out and standard error. I'm doing this asyncronously with the Process.ErrorDataReceived, Process.OutputDataReceived events, and Process.BeginOutputReadLine() and Process.BeginErrorReadLine().
I also need to know when the process has exited, and i've received all the data. The problem is, that the Process.Exited event is fired before all of the data has been processed.
I need to tidy up other stuff when the process has exited and all the data from stdout/stderr has been received. But I cannot for the life of me find a way of working out when that is the case. Can anyone help?
thanks
Jon
|
|
|
|
|
Hi Jon,
I've been struggling with this one for a while myself and was able to create a scenario where standard out/err data were not handled by dumping a large number of lines from the process right before exiting. I had hoped to be able to switch from asynchronous to synchronous reads once the WaitForExit() returns, and then receive the remaining data with a process.StandardOutput.ReadToEnd(). Unfortunately, this is not possible:
"You cannot mix asynchronous and synchronous read operations on the redirected StandardOutput stream. Once the redirected stream of a Process is opened in either asynchronous or synchronous mode, all further read operations on that stream must be in the same mode. If you cancel an asynchronous read operation on StandardOutput and then need to read from the stream again, you must use BeginOutputReadLine to resume asynchronous read operations. Do not follow CancelOutputRead with a call to the synchronous read methods of StandardOutput such as Read, ReadLine, or ReadToEnd."
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.canceloutputread.aspx[^]
As far as I can tell, this applies to anything you could check (process.StandardOutput.EndOfStream) to see if it were necessary for you to delay cleanup. Unless I'm missing something, which is entirely possible, this seems like a shortcoming of the Process class, because it essentially means that you can't trust the asynchronous interface to provide you with all of your data.
Sadly, this seems to leave us with synchronous IO, perhaps a couple extra threads, and the additional synchronization issues that this approach entails (see here[^] for a deadlock condition to watch out for).
The only other thing that has worked for me so far, and this is sort of hackish, is to sleep the thread that handles the Exited event (or a return from WaitForExit) to give the DataReceived events time to fire a few more times. I ended up with something like this:
RunningProcess.Start();
RunningProcess.BeginOutputReadLine();
RunningProcess.BeginErrorReadLine();
while (!Completed && !ProcManager.ProcedureAborted)
{
Completed = RunningProcess.WaitForExit(ProcManager.TSK_ABORT_CHECK_TIMEOUT_MS);
}
if (ProcManager.ProcedureAborted)
{
Thread.Sleep(200);
}
200ms seemed to be sufficient in the scenario that I was working on. This approach has potential issues: behavior may be system dependent, and you're making assumptions about how much time you need to flush the buffers (i.e., you might lose output on a slower system, but nothing that you aren't already losing). You may need to play around with it to find a balance between perceivable performance issues caused by too much delay, and not processing all of the output. Again, you could try moving completely to synchronous IO, but the above approach has worked fairly well for me so far.
Hope this helps,
Heath
|
|
|
|
|
I am experienceing a problem breaking up three bytes of data into bit arrays and assigning a value to an enumeration as a result, code shown bellow:
if (UpdateLEDAndBeepStatus != null)
{
BitArray byte0 = new BitArray(commandData.Data[0]);
BitArray byte1 = new BitArray(commandData.Data[1]);
BitArray byte2 = new BitArray(commandData.Data[2]);
enumLEDAndBuzzer[] LEDAndBuzz_enumArray = new enumLEDAndBuzzer[15];
if (byte0[0] == true)
{
LEDAndBuzz_enumArray[0] = enumLEDAndBuzzer.BUZZER_STATE_ON;
}
else
{
LEDAndBuzz_enumArray[0] = enumLEDAndBuzzer.BUZZER_STATE_OFF;
}
if (byte0[1] == true)
{
LEDAndBuzz_enumArray[1] = enumLEDAndBuzzer.LED1_MCUEnable_ON;
}
else
{
LEDAndBuzz_enumArray[1] = enumLEDAndBuzzer.LED1_MCUEnable_OFF;
}
When the project gets to this stage the values in the bytes are "255".
Should that not mean all 8 bits will be true?
However my code never enters the true section of my if statement claiming "byte0[0]" is false.
Either that or i am going about checking the bit values wrong, can anyone help?
Thanx George
|
|
|
|