Click here to Skip to main content
15,905,686 members
Home / Discussions / C#
   

C#

 
AnswerRe: architecture Pin
Dan Mos2-Aug-11 4:01
Dan Mos2-Aug-11 4:01 
Questionmissing resources Pin
lukeer2-Aug-11 0:17
lukeer2-Aug-11 0:17 
GeneralRe: missing resources Pin
Shameel2-Aug-11 5:50
professionalShameel2-Aug-11 5:50 
QuestionDatagrids Pin
Beetle Juice1-Aug-11 23:29
Beetle Juice1-Aug-11 23:29 
Questionhiding process arguments Pin
navish011-Aug-11 21:25
navish011-Aug-11 21:25 
AnswerRe: hiding process arguments Pin
Shameel1-Aug-11 23:24
professionalShameel1-Aug-11 23:24 
GeneralRe: hiding process arguments Pin
navish012-Aug-11 1:58
navish012-Aug-11 1:58 
GeneralRe: hiding process arguments Pin
Dave Kreskowiak2-Aug-11 4:19
mveDave Kreskowiak2-Aug-11 4:19 
GeneralRe: hiding process arguments Pin
Shameel2-Aug-11 5:20
professionalShameel2-Aug-11 5:20 
QuestionOpening multiple instances of the same form and Identification. Pin
MAW301-Aug-11 15:58
MAW301-Aug-11 15:58 
AnswerRe: Opening multiple instances of the same form and Identification. Pin
Dr.Walt Fair, PE1-Aug-11 18:30
professionalDr.Walt Fair, PE1-Aug-11 18:30 
AnswerRe: Opening multiple instances of the same form and Identification. [modified] Pin
Shameel1-Aug-11 22:08
professionalShameel1-Aug-11 22:08 
AnswerRe: Opening multiple instances of the same form and Identification. Pin
BillWoodruff2-Aug-11 23:05
professionalBillWoodruff2-Aug-11 23:05 
Questionhow to get virtual memory using wmi Pin
anaidy0u1-Aug-11 15:57
anaidy0u1-Aug-11 15:57 
QuestionHow do you dynamically assign a datagrid's headers in c#? Pin
Xarzu1-Aug-11 15:05
Xarzu1-Aug-11 15:05 
QuestionHow to work with generic date format Pin
Gali19781-Aug-11 9:58
Gali19781-Aug-11 9:58 
AnswerRe: How to work with generic date format Pin
#realJSOP1-Aug-11 12:01
professional#realJSOP1-Aug-11 12:01 
AnswerRe: How to work with generic date format Pin
Luc Pattyn1-Aug-11 12:47
sitebuilderLuc Pattyn1-Aug-11 12:47 
GeneralRe: How to work with generic date format Pin
Dalek Dave1-Aug-11 12:49
professionalDalek Dave1-Aug-11 12:49 
GeneralRe: How to work with generic date format Pin
Luc Pattyn1-Aug-11 12:51
sitebuilderLuc Pattyn1-Aug-11 12:51 
GeneralRe: How to work with generic date format Pin
PIEBALDconsult1-Aug-11 14:42
mvePIEBALDconsult1-Aug-11 14:42 
AnswerRe: How to work with generic date format Pin
Luc Pattyn1-Aug-11 15:04
sitebuilderLuc Pattyn1-Aug-11 15:04 
I am assuming you mean the following would be good:
string SQL="UPDATE tableName SET anInt=@anInt, aString=@aString, anotherInt=@anInt, aDate=@aDate WHERE ..."
OleDbCommand cmd=new OleDbCommand(...);
cmd.Parameters.Add("@anInt", OleDbType.Int).Value=12;
cmd.Parameters.Add("@aString", OleDbType.VarChar).Value="abc";
// no need to give the third parameter as it re-uses the first one
cmd.Parameters.Add("@aDate", OleDbType.Date).Value=DateTime.Today;

as the parameters are given in the order of first use.

But then that limitation seems pretty weird, as now they use parameter names to handle duplicate uses, but not for general parameter identification? That doesn't make much sense to me. If they would use names all the way (not hard at all), it would work like T-SQL and others!?

Maybe it depends on the OleDb version, where older ones need "?" and newer ones do it the proper way? Just guessing. Do you have any reference?

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: How to work with generic date format Pin
PIEBALDconsult1-Aug-11 19:07
mvePIEBALDconsult1-Aug-11 19:07 
AnswerRe: How to work with generic date format [modified] Pin
Luc Pattyn1-Aug-11 15:21
sitebuilderLuc Pattyn1-Aug-11 15:21 
GeneralRe: How to work with generic date format Pin
Peter_in_27801-Aug-11 16:30
professionalPeter_in_27801-Aug-11 16:30 

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.