Answer Questions
Jay McCleery insert into a table using DataSet
I'm trying to insert a row into a table using a DataSet, and having no luck. Here's what I have so far: DataSet ds = new DataSet(); SqlDataAdapter sda; XmlSerializer ser = new XmlSerializer(typeof(myClass)); & ...Show All
Pete Tirrell Can XmlWriter validate against schema also? (.NET 2.0)
Hi, I know that XmlReader can validate XML data against XSD. Is there an option to use an XmlWriter which can validate its data as it writes it The XmlWriter class doesn't seem to support validation. But if you have the XML stored in a XmlDocument prior to saving, you can use one of the XmlDocument.Validate() overloads. Side note: I do not see any reasonable way to handle validation errors when using a ...Show All
Rajiv Roopan DrawString in .NET
Hi, I am trying to use the DrawString function so that it does not put a space at the heading and trailing of a string I have tried MeasuretrailingSpaces but that doesn't seem to work. I want the string to start exactly at my x coordinate. Do i have to set the StringFormat to achieve this rotsey Thanks Chris but that is not the issue. I have a page with a textarea and a label control and some controls to select the font style. The user ty ...Show All
Codylcran ConnectionString
Hello, I have a connection string in my config file, that I use to connect to SQL server. But it requires the password. How can I add this sensitive data to the connection string in my application. Thank you. I am not using ASP.NET What I decided to use, is since I am using TableAdapters to manipulate data in the tables, I can set, get the connection string from the property on the adapter, and I ...Show All
jorgeben Hashtable.Item thread safety
Hi, I need to know if the Item property of the Hashtable class is thread safe for reading. I just want to be sure because I don't want to introduce the overhead of synching mechanisms unnecessarily. Thanks in advance. Juan. Thanks. Edit: I actually have read the MSDN documentation which says "To support one or more writers , all operations on the Hashtable must be done through the wrapper returned by the Sy ...Show All
Moosdau How to put a array of bytes in Access database
Hi all I want to store and retrieve an array of byte (of size 120) to a table of MS Access. What will data type of field in Accessto store that and how to do that in say C# Please help Amir Similar questions have been posted before. These two articles are pretty good: http://support.microsoft.com/kb/308042/en-us http://support.microsoft.com/kb/321900/en-us ...Show All
Modernthinker Dates and the database
I'm really having trouble figuring out how to handle dates within my database. SQL is really picky about date fields, and so I'm having trouble. 1. If I want to leave a date field null - I can simply omit it from the insert statement, but then once it is entered and I try to "null" it out then the database gets mad at me. 2. If using .NET I try to check for validity on a null date - it returns as valid because the time element of ...Show All
Alan2007 UDPClient Slow Connection
Hello, I was developing an UDP sender service (for an applicatoin in my company) and I used the UdpClient, which came to be really handy and useful. But when I tried to send UDP datagrams to an unknown IP, this means a fake low IP (for example 10.198.0.105 whick was not present on my network) the UdpClient in fact sent the data but after a huge amount of time... 10 seconds or even more. First I used the Udpclient Send method passing the byte arr ...Show All
EricEarle Error 27 Option Strict On disallows operands of type Object for operator '='. Use the 'Is' operator to test for object identity.
Hi Guys How would I best resolve this, VS 2K5 is complaing about the values in the case statements and not able to test for object Identity, I don't want to test for object identity I'm looking for values, I know I could add the ToString option after optCurrency.Value.ToString and then put both the "2" and "3" in quotes but that does't seem right either, any thoughts Select Case Me .optCurrency.Value Case 2 Me .optCurrency.Value = ...Show All
IS dude Determining hidden members via reflection.
What's the sane way to determine, via reflection, whether a type member has hidden a method or not ***CODE*** namespace Goomba { public class Base { public virtual void Action() { System.Console.WriteLine("Happyness is for fools!"); } } public class Subclass : Base { public override void Action() { System.Console.WriteLine("Get happy!"); ...Show All
JoeSmoe DataReader rows into a collection object
Hi, I have a datreader object with 100 rows, i created a collection object[ arraylist / hashtable] and stored all the rows to the collection object. I dont want to keep the connection opened that's the reason i stored the data to the collection object and killed the datareader object. But the problem is I wanted to retrieve the value using column names not by index. For this I looped thru the column names from dataread ...Show All
pcrtrg PrintPreviewControl
Hi all, I am facing problem regarding PrintPreviewControl. i have developed application using VB.NET and made a report using Document Class and write all necessary code. Now , i am using PrintPreviewControl for displaying that Page in Win 2000 and Win XP, it shows very clearly, but when i deploy this application on the Win 98 SE Platform. it throws exception such as follows: System.Drawing.Printing.PrintPreview.CalculatePageInfo() and ...Show All
Len Weaver Problems with Find-Method and binding
Hi, I'am using following code to search for a special string and bind them to a DataGridView: Dim drv As DataRowView() dv.Sort = strCol Dim val As Object val = strCol drv = dv.FindRows(val) Me .DataGridView.DataSource = drv First the searched data is displayed correctly, but after a few seconds the error "IsNew" is no member off ... ouccured. The datagridview changed the columns to IsEdit, IsNew, and so one. C ...Show All
agkik The same table <choice> cannot be the child table in two nested relations
I have a xml file generated by third party. I need to display the content on datagrid to let user modify and write back to the xml file. Usually I create a dataset and read the xml into it. But this xml file is different from those i have worked on before which it gives me such error message as in the subject. What should I do This problem/issue affects several industry standard schemas u ...Show All
ColinW .NET String Class
Hi folks, I'm just wondering if anyone can point me at a tutorial for using the String class included with the .NET framework I'd like to use it in a Managed C++ Winforms app. The MSDN entry for String class is describing all functionality. http://msdn2.microsoft.com/en-us/library/system.string.aspx Be sure your language filter (top of page) is set to include C++ ...Show All
