Answer Questions
BartonFinkle Copy schema from data table to data source?
DataAdaptor.FillSchema is handy for creating a data table and configuring it to match the schema of an existing table in a data source. But I need to do just the opposite. I have a table that I create progamatically. I create a new SQL database using t-SQL CREATE DATABASE. I want to add a new table to the database with schema matching that of my existing table. I can do it rather laboriously with t-SQL, but some sort of "DataAdapt ...Show All
ingosen Variables in a sql command
Hi, I am connecting to a database using the wizrds on visual studio.net(is that ADO ) but the problem I am having is a fairly easy one I think. I want to use a variable as my WHERE command in my sql statment. for example int Number1 = 1; SqlDataSource1.SelectCommand = "SELECT UserID FROM Users WHERE UserID = 'Number1'; I am postive that the UserID is an int value. The program compiles correctly but when I run the&nb ...Show All
KYoung Programatically checking whether a type implements a interface?
Hi all, How can i programatically find whether a type is marked with an attribute or it implements an interface For ex: [Serializable] class MyClass : ISerializable { } If my function get this type as input it should tell me whether it is marked with any attribute or it implements any interface. Thanks, Suresh. I'd do it like this: bool hasAttribute = typeof (MyClass).IsSerializable; bool imp ...Show All
Daby292002 What's wrong with my code, please help!
After I run the application, after click the buton, nothing appears except some blank lines inserted to the listBox, but it ought to display the String from the artmoney process. Could you please tell me what's wrong with my code I've spend 3 hours on it, but could not find the solution. /*Text.cs*/ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using ...Show All
Adrian_78787 Blocking StreamReader
=========== C# Framework 1.1 =========== am writting a local proxy that listen for incoming http requests esp those sent/received through Yahoo Messenger to handle files transfer. anyway, i have a test file (test.txt) which contains the following two lines: Hello World | please note there's an empty line below Hello World's line(return). when i send the file through Yahoo Messenger, i get the final request from YM which is somthin like the fo ...Show All
Neil Kronlage - MSFT Use .net serialization or a custon soultion?
Hi, Basically, I need to clone objects to remote processes. Now it's not that simple... I want to decide per remote client which members are to be serialized. Some of the data must remain hidden for security reasons, and the extent of the data hiding is dynamically computed at runtime and may change per object per client over time. In some cases only a part of a class might have changed. I'd want to serialize only the affected ...Show All
jhudson StringBuilder class
I am attempting to use the stringbuilder class as a command buffer for commands that are being received via TCP. Since there is no guarantee that the entire command will be received on the server end, I have my receive thread simply append the command to a variable of type Stringbuilder. This works fine to continue to build the buffer but there are not any methods to find and pull out the command string from the buffer. At this point, I am pl ...Show All
KrzysztofP TCP Sockets checking aliveness
Hi, I have an app where it is critical that any connection interruption between the server and the client is immediately noticed. Right now I'm using a "ping packet" that I send to the server and the server sends it back. If it's not returned within time x and the server hasn't received a new one within time x the client assumes it's disconnected or the server disconnects the client. However, since I'm sometimes sending large objects o ...Show All
fastdev The ShowWithOutActivation Property
I posted this in the VB forum at first but with no joy so I’m hoping some one that uses one of the other .net syntaxes can help me :D I have added the following override to my form but when ever the form opens (or pops up in the bottom right of the screen) it steals the focus away from the main form which the user is typing into, which causes (if they are in a text box for example) all the text in the field to be highlighted (when the form ...Show All
Ibrahim Hafidh selfssl fails cryptographic context
I am trying to use the selfssl.exe program to add a security certificate to my IIS server so I can do some ASP development. I am receiving the following error "Failed to acquire the cryptographic context: 0x8009000f". I have tried uninstalling and reinstalling IIS but I still get the same error. I am running XP SP2. Any help would be appreciated. I am able to add a certificate to IIS using the above ...Show All
lukem_95 System.Math.Round(Double, Integer) bug?
I'm not sure if I'm missing something here but there seems to be a bug in the System.Math.Round function from the .NET 2.0 For example, this code: Math.Round(4175 /1000, 1) Returns: 4.1999998092651367 The exact same code compiled in VB2003 (.NET 1.1) returns: 4.2 Does anyone knows why is this Chris, Once again, thank you for the information. I have just submitted the bug: http://lab.msdn.microsoft.com/Product ...Show All
DanKirkwoodJr default path to web application
I try to create a trace filter for my web service, and would like to write the log file to the root directory of my web service. Can some one tell me how get the path to the root directory programatically. I tried to use just the filename, the default path seems to be c:\windows\system32. I also tried to use webContext.ApplicationPath. the webContext.ApplicationPath returns empty string. I am using WSE 3.0 with VS 2005 pro. Thank you ...Show All
Derek Chan How to Serialize a non Sertilizable object into Binary?
Hi , I have an object ObjXML of type XmlDocument (object may be of any non serializable class). I have to Serialize it into Binary. I know that XmlDocument does not implement ISerializeable. That's why according to framework we cannot serialize it. So is there anyway around to get this object (ObjXML) into Binary. I will be highly obliged to your help. & ...Show All
Becker2 OleDbCommand.ExecuteNonQuery "Insert Into Select From"
Hello, I am working with OleDb to perform a bulk insert from a temporary table to permanent database table, both of which belong to the same database. I am wanting to use "INSERT INTO <permanent_table> SELECT * FROM <temp_table>". The query I run in MS Access to perform this bulk load does process correctly, but not in code using OleDb. After properly setting up my OleDbConnection object, opening it, and properly ...Show All
MSDN Sealevel Updating IBindingList from different thread
I have a DataGridView which draws it's information from a BindingSource. This BindingSource gets it's data from a BindingList. Now, I need to update this BindingList from a different thread than the one that the DataGridView is implemented on. When I try to do this, I catch a thrown exception and the exception says that I cannot modify the control from a different thread (understandable). However, how can I work around this In my ...Show All
