Click here to Skip to main content
15,912,475 members
Home / Discussions / C#
   

C#

 
QuestionRe: a query. Pin
Pratik Vasant Shah18-Feb-07 23:18
Pratik Vasant Shah18-Feb-07 23:18 
AnswerRe: a query. Pin
virendra patel18-Feb-07 23:20
virendra patel18-Feb-07 23:20 
GeneralRe: a query. Pin
Nekshan18-Feb-07 23:27
Nekshan18-Feb-07 23:27 
GeneralRe: a query. Pin
virendra patel18-Feb-07 23:37
virendra patel18-Feb-07 23:37 
QuestionRe: a query. Pin
Nekshan18-Feb-07 23:57
Nekshan18-Feb-07 23:57 
AnswerRe: a query. Pin
virendra patel19-Feb-07 0:06
virendra patel19-Feb-07 0:06 
GeneralRe: a query. Pin
virendra patel18-Feb-07 23:40
virendra patel18-Feb-07 23:40 
AnswerRe: a query. Pin
Guffa18-Feb-07 23:39
Guffa18-Feb-07 23:39 
Nekshan wrote:
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '" + DateTime.Now + "';
what is wrong?


You have forgotten the parenthesis around the values, and you have forgotten to convert the DateTime value into a string:

strQury = "insert into dashboarddealerlogin (logoutdatetime) values ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');

You should make sure that the date format that you use is understood correctly by the database. I prefer the ISO 8601 date format as it's unambigous.


---
single minded; short sighted; long gone;

AnswerRe: a query. Pin
Colin Angus Mackay18-Feb-07 23:40
Colin Angus Mackay18-Feb-07 23:40 
QuestionPower Saving Pin
usermans18-Feb-07 23:14
usermans18-Feb-07 23:14 
AnswerRe: Power Saving Pin
Niiiissssshhhhhuuuuu19-Feb-07 0:05
Niiiissssshhhhhuuuuu19-Feb-07 0:05 
GeneralRe: Power Saving Pin
usermans19-Feb-07 0:47
usermans19-Feb-07 0:47 
QuestionC# programming: Workspace app & reflection Pin
motojojo18-Feb-07 22:29
motojojo18-Feb-07 22:29 
QuestionDesktop application Pin
Muhammad Nauman Yousuf18-Feb-07 21:52
Muhammad Nauman Yousuf18-Feb-07 21:52 
AnswerRe: Desktop application Pin
Ravi Bhavnani19-Feb-07 7:11
professionalRavi Bhavnani19-Feb-07 7:11 
QuestionC# Graphics Pin
Monk11118-Feb-07 21:45
Monk11118-Feb-07 21:45 
AnswerRe: C# Graphics Pin
Christian Graus18-Feb-07 21:56
protectorChristian Graus18-Feb-07 21:56 
GeneralRe: C# Graphics Pin
Monk11118-Feb-07 22:04
Monk11118-Feb-07 22:04 
GeneralRe: C# Graphics Pin
Christian Graus18-Feb-07 23:54
protectorChristian Graus18-Feb-07 23:54 
AnswerRe: C# Graphics Pin
Luc Pattyn19-Feb-07 2:11
sitebuilderLuc Pattyn19-Feb-07 2:11 
QuestionCombo boxes in datagrids Pin
devlpa_powelly18-Feb-07 21:45
devlpa_powelly18-Feb-07 21:45 
QuestionSomething better than CASE Pin
Glen Harvy18-Feb-07 21:39
Glen Harvy18-Feb-07 21:39 
AnswerRe: Something better than CASE Pin
Guffa18-Feb-07 21:45
Guffa18-Feb-07 21:45 
GeneralRe: Something better than CASE Pin
Glen Harvy18-Feb-07 22:41
Glen Harvy18-Feb-07 22:41 
AnswerRe: Something better than CASE Pin
Guffa18-Feb-07 23:42
Guffa18-Feb-07 23:42 

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.