Click here to Skip to main content
15,908,274 members
Home / Discussions / C#
   

C#

 
AnswerRe: getting day of the date Pin
Jesal Rana19-Jun-06 2:39
Jesal Rana19-Jun-06 2:39 
QuestionPLEASE HELP Pin
innocent7318-Jun-06 22:44
innocent7318-Jun-06 22:44 
AnswerRe: PLEASE HELP Pin
Colin Angus Mackay19-Jun-06 0:05
Colin Angus Mackay19-Jun-06 0:05 
GeneralRe: PLEASE HELP Pin
innocent7319-Jun-06 0:19
innocent7319-Jun-06 0:19 
GeneralRe: PLEASE HELP Pin
Colin Angus Mackay19-Jun-06 0:36
Colin Angus Mackay19-Jun-06 0:36 
GeneralRe: PLEASE HELP Pin
innocent7319-Jun-06 0:55
innocent7319-Jun-06 0:55 
GeneralRe: PLEASE HELP Pin
Colin Angus Mackay19-Jun-06 1:54
Colin Angus Mackay19-Jun-06 1:54 
AnswerRe: PLEASE HELP Pin
Nader Elshehabi19-Jun-06 1:14
Nader Elshehabi19-Jun-06 1:14 
I'm not really that experienced in SQL, but...

We all know that queries are only text, so if you want to pass a date to SQL server, you should pass it as a text. And why not? I believe it would be something like:

string strUpdate="UPDATE MAINT_START SET MaintReason='" + cMaintReason.Text.TrimEnd() + "'," +
" MaintCompany='" + cMaintCompany.Text.TrimEnd() + "'," +
" MaintCompanyTel='" + cMaintCompanyTel.Text.TrimEnd() + "'," +
" MaintCompanyAddress='" + cMaintCompanyAddress.Text.TrimEnd() + "'" +
" WHERE PlateNumber='" + cPlateNumber.Text + "' AND" +
" MaintEntryDate =" DateTime.Parse(cMaintEntry.Text).ToString();

Did you notice the Parse-ToString way?

Another way if you really want to pass it as a datetime -I really can't see why the persistenceSmile | :) - perhaps you should consider using Typed datasets rather than SQLCommands?? Just a suggestion.

I hope that was close enough;)

GeneralRe: PLEASE HELP Pin
Colin Angus Mackay19-Jun-06 1:57
Colin Angus Mackay19-Jun-06 1:57 
QuestionApplying themes in application using VC# Pin
vikas84singh18-Jun-06 22:33
vikas84singh18-Jun-06 22:33 
AnswerRe: Applying themes in application using VC# Pin
BoneSoft19-Jun-06 4:28
BoneSoft19-Jun-06 4:28 
Questionhowto use dll in windows applications ? Pin
cmpeng3418-Jun-06 21:35
cmpeng3418-Jun-06 21:35 
AnswerRe: howto use dll in windows applications ? Pin
Paul Brower19-Jun-06 4:05
Paul Brower19-Jun-06 4:05 
Questionsql query Pin
Mahmood Ilyas18-Jun-06 21:00
Mahmood Ilyas18-Jun-06 21:00 
AnswerRe: sql query Pin
testy_proconsul18-Jun-06 23:08
testy_proconsul18-Jun-06 23:08 
AnswerRe: sql query Pin
Colin Angus Mackay19-Jun-06 0:07
Colin Angus Mackay19-Jun-06 0:07 
AnswerRe: sql query Pin
bannapradeep19-Jun-06 2:39
bannapradeep19-Jun-06 2:39 
GeneralRe: sql query Pin
Colin Angus Mackay19-Jun-06 3:52
Colin Angus Mackay19-Jun-06 3:52 
GeneralRe: sql query Pin
Mahmood Ilyas21-Jun-06 19:06
Mahmood Ilyas21-Jun-06 19:06 
QuestionCoding for search Pin
ChennaiBabu18-Jun-06 20:44
ChennaiBabu18-Jun-06 20:44 
AnswerRe: Coding for search Pin
Christian Graus19-Jun-06 0:15
protectorChristian Graus19-Jun-06 0:15 
QuestionPictureBox problem Pin
kissmac18-Jun-06 20:35
kissmac18-Jun-06 20:35 
AnswerRe: PictureBox problem Pin
WillemM18-Jun-06 21:26
WillemM18-Jun-06 21:26 
AnswerRe: PictureBox problem Pin
Nader Elshehabi19-Jun-06 0:16
Nader Elshehabi19-Jun-06 0:16 
AnswerRe: PictureBox problem Pin
bannapradeep19-Jun-06 2:43
bannapradeep19-Jun-06 2:43 

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.