|
Hey
I have created a StreamWriter and an excel object and as far as I sew after creating the excel object part of the StreamWriter changed to null.
Did anyone had a similar issue ?
Clint
|
|
|
|
|
If memory is being stomped, it's being stomped by Excel in C++ and not by C#, per se. How does part of the object turn to null ? Which part ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The leak was in the object StreamWriter, BaseStream and Encoding became NULL.
Thanks,
Clint
|
|
|
|
|
|
How do I return Key-Value collection from a web service..
Is there any object I can make use of directly
Thanks
Jo
JO
|
|
|
|
|
Hi All,
I have a XML string with me in the format
<row xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SEQNO>6</SEQNO>
<B_CO_CD>H</B_CO_CD>
<B_AREA_CD>K</B_AREA_CD>
</row>
the XML tags are taken in an actual string variable and then I need to find a particular tag and get its value to actually set that value in a dataset column that corresponds to this tag.
How can I do this ??
Pls guide me.. I need to give demo on this..Pls Pls
Omkar
|
|
|
|
|
If I understood you correctly and you have a string variable that contains the given Xml, you could create a XmlDocument object and populate it with the Xml contained in the string using its Loadxml method. Afterwards use e.g. SelectSingleNode method to access the wanted data.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Is there a way that a method can get access to the name of the class that called the method?
Say I have a 'CoolConsoleApp' class that calls the 'DoStuff()' static method inside the 'MyUtils' class (MyUtils.DoStuff()), how could DoStuff() retrieve the class name 'CoolConsoleApp' at runtime? Cheers!
Sunday Ironfoot
www.dominicpettifer.co.uk (work in progress)
|
|
|
|
|
Take a look at the StackTrace class. It'll give you access to the StackFrame s your method was called by.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Sweet! That seems to have done the trick, for those interested I came up with the following code from mav's suggestions...
public static void StackFrameTest()
{
StackTrace trace = new StackTrace(true);
StackFrame frame = trace.GetFrame(1);
string x = frame.GetMethod().DeclaringType.Name;
}
Use a break point on string x and you'll see that x holds the class name of the method that called the StackFrameTest() method.
Sunday Ironfoot
www.dominicpettifer.co.uk (work in progress)
|
|
|
|
|
Hi All,
I have a problem with saving encrypted data into SQL 2000 server.
The user suppose to register with new password and the password
encrypted and save into DB. However, it "CONVERT" some chars into
"?" or "empty square ". Any idea?
Thanks
|
|
|
|
|
Those are characters whose values (unicode) are not mapped in your current display font. The actual binary data is unchanged, its just that the binary value doen't correspond to a legal character in the font set.
|
|
|
|
|
Buy why it gave me error if I used the same password to login into the form.
sql server somehow change the char to "?" or "empty square" char?
|
|
|
|
|
Are you making sure to encrypt what the user types in to log into the system (with the same key) and comparing the two encrypted values? What type of encryption are you using, Semetric (Blowfish, 3DES) or One-way Hashing (MD5, SHA1)?
Sunday Ironfoot
www.dominicpettifer.co.uk (work in progress)
|
|
|
|
|
How are you storing that data? Assuming your character is unicode, you'll need to store your data as type NVarChar or NText.
|
|
|
|
|
i have listview with multi colum
when i add item i see it at the botton
now
1- how make the scrol of the the listview always at the botton
or
2- how can add item to the top at all item in the listView
Palestine
|
|
|
|
|
TAREQ F ABUZUHRI wrote: 1- how make the scrol of the the listview always at the botton
myListView.EnsureVisible(myListView.Items.Count - 1);
TAREQ F ABUZUHRI wrote: how can add item to the top at all item in the listView
myListView.Items.Insert(0, theItem);
|
|
|
|
|
I just picked up this client who wants me to design and build a data base application for them and i have no problem with that. I was just wondering what is a good gird control to use with C# and SQL
Thanks in advance
|
|
|
|
|
Have you looked at the built-in System.Windows.Forms.DataGridView ?
|
|
|
|
|
Yes I have looked at it a little bit but i could not figure out how to resize the coulms
thanks
ryan
|
|
|
|
|
|
I'm new to C# so I have at present been keeping the coding simple.
This is for a windows application
I have 6 text boxes depending on which last two are filled, on exit it checks the database (sql server) to see if its a valid record
Beneath these boxes is a datagrid, I worked out how to label the columns, what I'm trying to do and cannot figure it out yet is once the text boxes have been validated on exit I would like to copy the information into the datagrid. Afterwards I will blank the text boxes ready for further input.
Any help would be much appreciated
Robert
|
|
|
|
|
You need to put the text into a container of some sort, DataTable, Array, List<>, whatever and bind the datagrid to it.
only two letters away from being an asset
|
|
|
|
|
There are plenty of articles on how to bind an arraylist to a datagrid, but how exactly does one get the arraylist back out of the datagrid?
I have bound an arraylist to the datagrid, and allow users to change all values (decimal, string, checkbox) and would like to update my arraylist to match the changes.
I guess there are two approaches, interate through each row of the datagrid, create a new object for my arraylist, and add it to a new arraylist...
Or I could just go trhough and compare the objects in arraylist and that of the datagrid and update whatever has changed...
Can anyone point me in the right direction as to how to approach this?
|
|
|
|
|
I vaguely recall seeing code similar to this:
ArrayList list = (ArrayList) yourDataGrid.DataSource;
|
|
|
|