Click here to Skip to main content
15,884,932 members
Home / Discussions / C#
   

C#

 
GeneralRe: WinForms app displays differently on different computers. Pin
~michL~3-Feb-04 13:44
~michL~3-Feb-04 13:44 
GeneralRe: WinForms app displays differently on different computers. Pin
Heath Stewart3-Feb-04 17:54
protectorHeath Stewart3-Feb-04 17:54 
GeneralProgramatically iterating through controls in C# csharp or VB.net Pin
billoo2-Feb-04 11:51
billoo2-Feb-04 11:51 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
Heath Stewart2-Feb-04 12:05
protectorHeath Stewart2-Feb-04 12:05 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
billoo2-Feb-04 12:33
billoo2-Feb-04 12:33 
GeneralRe: Programatically iterating through controls in C# csharp or VB.net Pin
Colin Angus Mackay2-Feb-04 12:06
Colin Angus Mackay2-Feb-04 12:06 
GeneralUpdating table from datatable Pin
zuhx2-Feb-04 11:38
zuhx2-Feb-04 11:38 
GeneralRe: Updating table from datatable Pin
Heath Stewart2-Feb-04 12:01
protectorHeath Stewart2-Feb-04 12:01 
Reading the table into a DataTable and adding that to a DataSetis what I would recommend, but iterating over the list of values in the text file and using a simple SqlCommand with SqlParameters (so you declare the command one and parameterize it to simply change the values and call ExecuteNonQuery) would also be easy and more efficient.

If you want to use the SqlDataAdapter, you must at least have the SelectCommand assigned to with a SqlCommand for your SELECT statement. In order to insert, update, or delete rows, however, you must have the InsertCommand, UpdateCommand, and DeleteCommand assigned on the SqlDataAdapter. You can use the SqlCommandBuilder with the SelectCommand if the command is simple enough (i.e., JOINs and other advanced statements are not supported). Also, the SelectCommand must be parameterized (see the SqlCommand.Parameters property).

See the SqlDataAdapter class documentation in the .NET Framework SDK (installed by default with VS.NET, and available online from http://msdn.microsoft.com/netframework[^]) for more information and an example of how to use some of these classes.

 

Microsoft MVP, Visual C#
My Articles
GeneralListView Pin
Gary Kirkham2-Feb-04 11:23
Gary Kirkham2-Feb-04 11:23 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 11:57
protectorHeath Stewart2-Feb-04 11:57 
GeneralRe: ListView Pin
Gary Kirkham2-Feb-04 12:02
Gary Kirkham2-Feb-04 12:02 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 12:06
protectorHeath Stewart2-Feb-04 12:06 
QuestionGood PDF Viewer control? Pin
Alex Korchemniy2-Feb-04 11:04
Alex Korchemniy2-Feb-04 11:04 
GeneralCOM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:26
KingTermite2-Feb-04 10:26 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 10:29
protectorHeath Stewart2-Feb-04 10:29 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:59
KingTermite2-Feb-04 10:59 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:01
protectorHeath Stewart2-Feb-04 11:01 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:09
KingTermite2-Feb-04 11:09 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:14
protectorHeath Stewart2-Feb-04 11:14 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:40
KingTermite2-Feb-04 11:40 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:49
protectorHeath Stewart2-Feb-04 11:49 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 3:24
KingTermite3-Feb-04 3:24 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart3-Feb-04 3:44
protectorHeath Stewart3-Feb-04 3:44 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 4:04
KingTermite3-Feb-04 4:04 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart3-Feb-04 4:26
protectorHeath Stewart3-Feb-04 4:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.