Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to make a part of the text as superscript in button text Pin
Pete O'Hanlon23-Jun-10 22:07
mvePete O'Hanlon23-Jun-10 22:07 
Questionhow to allign the image at the left corner..... Pin
Nivas8223-Jun-10 20:42
Nivas8223-Jun-10 20:42 
GeneralRe: how to allign the image at the left corner..... Pin
Nivas8223-Jun-10 21:16
Nivas8223-Jun-10 21:16 
QuestionHow to display excel sheet inside a windows form Pin
vineesh v23-Jun-10 20:28
vineesh v23-Jun-10 20:28 
QuestionLatency Meter Pin
satsumatable23-Jun-10 19:20
satsumatable23-Jun-10 19:20 
AnswerRe: Latency Meter Pin
DaveAuld23-Jun-10 20:09
professionalDaveAuld23-Jun-10 20:09 
QuestionInsert dataset into database Pin
shoubi23-Jun-10 16:31
shoubi23-Jun-10 16:31 
AnswerRe: Insert dataset into database Pin
PIEBALDconsult23-Jun-10 17:39
mvePIEBALDconsult23-Jun-10 17:39 
DataAdapters, and Update in particular, are very limited in what they can do -- I avoid them.

I've forgotten the details, but generally (for SQL Server):

0) Set a Command : INSERT INTO table (field0 ... ) VALUES (@Param0 ... )
1) Create the parameters : cmd.Parameters.Add ( new SqlParameter ( "@Param0" , typeof(whatever) ) )
2) Iterate the rows of a DataTable : foreach ( DataRow dr in ds.Table [ i ].Rows )
2.1) Set the parameter values : cmd.Parameters [ 0 ].Value = dr [ 0 ] ...
2.2) Execute the cmd : cmd.ExecuteNonQuery()
3) Repeat as necessary

I prefer to encapsulate this into a method so I don't need to remember it.
GeneralRe: Insert dataset into database Pin
shoubi23-Jun-10 17:43
shoubi23-Jun-10 17:43 
GeneralRe: Insert dataset into database Pin
PIEBALDconsult23-Jun-10 17:57
mvePIEBALDconsult23-Jun-10 17:57 
GeneralRe: Insert dataset into database Pin
shoubi23-Jun-10 18:07
shoubi23-Jun-10 18:07 
GeneralRe: Insert dataset into database Pin
PIEBALDconsult23-Jun-10 18:17
mvePIEBALDconsult23-Jun-10 18:17 
GeneralRe: Insert dataset into database Pin
shoubi23-Jun-10 19:21
shoubi23-Jun-10 19:21 
Questiongetting the local port as netstat in C# + small doubt on network connection Pin
manustone23-Jun-10 9:37
manustone23-Jun-10 9:37 
AnswerMessage Closed Pin
23-Jun-10 20:49
stancrm23-Jun-10 20:49 
GeneralRe: getting the local port as netstat in C# + small doubt on network connection Pin
manustone23-Jun-10 22:02
manustone23-Jun-10 22:02 
Question[newbie] EventLog log = new EventLog() does not work within catch {} block Pin
jon-8023-Jun-10 5:44
professionaljon-8023-Jun-10 5:44 
AnswerRe: [newbie] EventLog log = new EventLog() does not work within catch {} block Pin
Ennis Ray Lynch, Jr.23-Jun-10 5:59
Ennis Ray Lynch, Jr.23-Jun-10 5:59 
GeneralRe: [newbie] EventLog log = new EventLog() does not work within catch {} block Pin
jon-8023-Jun-10 6:23
professionaljon-8023-Jun-10 6:23 
AnswerRe: [newbie] EventLog log = new EventLog() does not work within catch {} block Pin
Abhinav S23-Jun-10 6:01
Abhinav S23-Jun-10 6:01 
GeneralRe: [newbie] EventLog log = new EventLog() does not work within catch {} block Pin
jon-8024-Jun-10 1:01
professionaljon-8024-Jun-10 1:01 
QuestionDirect X 9 from XNA? Pin
venomation23-Jun-10 5:25
venomation23-Jun-10 5:25 
AnswerRe: Direct X 9 from XNA? Pin
harold aptroot23-Jun-10 5:36
harold aptroot23-Jun-10 5:36 
QuestionTSR Pin
ayandelhi23-Jun-10 5:21
ayandelhi23-Jun-10 5:21 
AnswerRe: TSR Pin
Luc Pattyn23-Jun-10 5:26
sitebuilderLuc Pattyn23-Jun-10 5: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.