|
our application is .net oracle drive based and sometimes we get this error though 2GB RAM is lying free.
In our case, we reset msdtc (specific to our environment).
before c# there was darkness
|
|
|
|
|
Most of the time this is caused by a very stupid programming error. It happened to me when I just started using C#, I did nogt completely understand the concept of properties and made a prperty assign to itself.
It is difficult to give a general way out. Your best chance is to try isolate the probleme, but maybe you have to tear down your complete application to find out which line of code causes the problem.
You may use breakpoints to find out where your application uses operations that appear to take a long time (normally it takes some time to fill such an amount of memory).
Good bug hunting!
Rudolf Heijink
|
|
|
|
|
Hi,
Thanks for the response.....
I want the log details of an application to be saved for every 10 mins....
I made the log details available in textboxes and labels....
How to export the details to the excel sheet....
I have got information regarding exporting the datagridview but i did'nt use datagridview in any part of my code....
Please Help me to transfer the details entered in textboxes and labels to excel sheet without using a datagridview.
Regards,
Priya
|
|
|
|
|
|
Hello!
Thank you very much for looking at and answer my questions.
I develope mobile phone program using c# 2005,I set the anthor property of a datagrid control,but it does not work.I don't why,maybe it have something to do with my program achitecture.Because all my control is added according to a text file,which decide what kind of control to add and their property value,my program read this text file,and add control dynamicly.
Thanks for answering.
|
|
|
|
|
I need to print encrypted customer details as a barcode. then need to scan the data and read back the details.
My approch is like this,
I encrypted the string data using cryptoservices and get memory stream and sen the byte array data as unmanaged byte arra to the printer.
Byte[] bytes = memoryStream.GetBuffer();
IntPtr pUnmanagedBytes = new IntPtr(0);
int nLength;
nLength = Convert.ToInt32(memoryStream.Length);
pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength);
Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength);
PrintDirect.WritePrinter1(lhPrinter, pUnmanagedBytes, nLength, out pcWritten);
How can I read this data back to managed byte array from the scan device.
(BTW am I in the correct path.)
|
|
|
|
|
What is PrintDirect ? Is it a class for printing barcodes ? I'd assume that the same class would know how to return a byte array from the barcode it created ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
PrintDirect.writePrinter - normal pront command to write data to the printer. Theres a scan divice configured to a com port to scan the barcode. When i scan the barcode I need to read that data (that I send as unmanaged byte array to the printer). and decrypt it and get the initial customer details.
|
|
|
|
|
OK, so you have two problems
1 - write a barcode that your scanner can read back
2 - read it back
Assuming you got 1 right, 2 should just be a case of using the APIs provided by the scanner.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
everything works fine if I send my data as a string (print the barcode and read it back). Problem occures when I print it as an unmanaged byte array. Is there any way that I can send byte by byte to the printer and when scan it read byte by byte. Can anybody help me.
|
|
|
|
|
REalistically, we're just stabbing in the dark, because we have no idea what bar code system/scanner you are using. You may be hitting a limitation of the SDK, if you're finding a way to write a barcode, but that barcode cannot be read back.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I expect a barcode printer to accept printable text only, not just arbitrary bytes.
It probably will have trouble with non-printable characters.
One possible solution could be to use an encoding such as base64 (which replaces
a number of bytes by a greater number of ASCII-printable bytes, about 4 four 3).
Have a look at Convert.ToBase64String and Convert.FromBase64String
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
yes, the printer doesn't seems like accepting some characters. I've solved the problem by using different encryption/decryption method with no overhead (abandon the dot net cryptoservice ). Thanks alot for your comments. they help me to find the correct path.
|
|
|
|
|
im interested in getting certified in both ceritificates by self study..any advice of how i can do that?
|
|
|
|
|
Well, the obvious way is to know heaps about C# before you take it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yep, I'd go with that - I passed 70-316 (C# Windows Apps ..) using Kalani's book, but that IMHO wasn't enough - experience also was key...
|
|
|
|
|
Hello,
This is what I am trying to do.
1. On a list box item when the user selects an item, I have to let the user edit the item.
2. On LbSelectedIndexChanged()..I have to provide some way for the user to enter the new data and update it in the list box.
I tried doing this..putting up a new form that has a text box. I got lost at this point, I couldnt succeed to have a button(Done) trying to close the new form,get back and update the list box.
I am quite confused now..Looking for an possible, clear solution or a sample code
Thanks
D
|
|
|
|
|
hi,
are u using a database to populate the list box ? if yes, then on the new form, you could key in the new value and update the database, close this form and repopulate/refresh the list box to reflect the new value, this would also help to prevent accidental updates to the list, however if you are not using some data store, then I would say it is not feasible because every time your user closes the application the newly added value would be gone and this functionality would not be justified.
|
|
|
|
|
hi,
I have the list populated to the listbox from an array. However, i used an editable list box sample to get this done.
Thanks
D
|
|
|
|
|
If anyone would help, even thogh I know it's difficult, could someone please show me how to draw 2 squares and then write collision detection for them??????
MasterSharp (not REALLY a master at C#...)
|
|
|
|
|
It's really easy. First of all, in your onpaint, do two DrawRectangle calls on the graphics object. Then, you take each point that is a corner of one rectangle, and call the PtInRect method to see if it occurs inside the other rectangle. If any of htem do, then they intersect.
I'm going on memory, I may have some method names wrong, but those methods all exist, and will do what you want.
It's when you want to work out if irregular shapes intersect that you have issues.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Um, I'm sorry, but I lost you... I understand some of what you're saying... but did I mention I'm new?
|
|
|
|
|
OK, perhaps you need to learn how to use C# in general before you worry about drawing boxes and having them collide. If you don't understand what I said at all, then you probably need to crawl before you walk, if your intention is to learn how to code.
If you broadly get it and just need some more specific answers, ask away.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What do you mean by onpaint?
|
|
|
|
|
On the forms events. Like onLoad, where you can run code after everything has been initialized, but before the form loads and is shown. There is an onpaint event, you should be able to find it in design view with all the other events.
|
|
|
|