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

C#

 
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 
You can and should get rid of all regional setting stuff and avoid all string representations for dates, use the proper data types in your code AND in your database. This implies you use SQL parameters, not literal data.

For MS Access, use OleDbParameter (which requires the ? symbolic name in the SQL statement, where other databases would allow real symbolic names for the parameters; the question marks and parameters are synchronized in chronological order).

Example:
string SQL="UPDATE [references] SET  name=?,address=?,zip_code=?,date=? WHERE referenceID = 1115224993"

OleDbCommand cmd=new OleDbCommand(...);
...
cmd.Parameters.Add("date", OleDbType.Date).Value=DateTime.Today;
...


See, no date strings at all.

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

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 
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 
GeneralRe: How to work with generic date format Pin
Luc Pattyn1-Aug-11 16:55
sitebuilderLuc Pattyn1-Aug-11 16:55 
GeneralRe: How to work with generic date format Pin
PIEBALDconsult1-Aug-11 19:08
mvePIEBALDconsult1-Aug-11 19:08 
GeneralRe: How to work with generic date format Pin
Luc Pattyn2-Aug-11 1:34
sitebuilderLuc Pattyn2-Aug-11 1:34 
GeneralRe: How to work with generic date format Pin
PIEBALDconsult2-Aug-11 3:12
mvePIEBALDconsult2-Aug-11 3:12 
AnswerRe: How to work with generic date format Pin
Luc Pattyn2-Aug-11 16:58
sitebuilderLuc Pattyn2-Aug-11 16:58 
GeneralRe: How to work with generic date format Pin
PIEBALDconsult2-Aug-11 17:47
mvePIEBALDconsult2-Aug-11 17:47 
GeneralRe: How to work with generic date format Pin
PIEBALDconsult2-Aug-11 18:39
mvePIEBALDconsult2-Aug-11 18:39 
AnswerRe: How to work with generic date format Pin
Luc Pattyn3-Aug-11 4:41
sitebuilderLuc Pattyn3-Aug-11 4:41 
GeneralRe: How to work with generic date format Pin
PIEBALDconsult3-Aug-11 16:22
mvePIEBALDconsult3-Aug-11 16:22 
GeneralRe: How to work with generic date format Pin
Luc Pattyn3-Aug-11 16:59
sitebuilderLuc Pattyn3-Aug-11 16:59 

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.