Click here to Skip to main content
15,897,718 members
Home / Discussions / C#
   

C#

 
AnswerRe: decimal question Pin
OriginalGriff20-May-10 1:17
mveOriginalGriff20-May-10 1:17 
AnswerRe: decimal question Pin
Heinzzy20-May-10 1:59
Heinzzy20-May-10 1:59 
AnswerRe: decimal question Pin
Luc Pattyn20-May-10 2:51
sitebuilderLuc Pattyn20-May-10 2:51 
QuestionPrint certificate Pin
Jassim Rahma19-May-10 23:07
Jassim Rahma19-May-10 23:07 
AnswerRe: Print certificate Pin
OriginalGriff20-May-10 0:15
mveOriginalGriff20-May-10 0:15 
QuestionChange SQL Server dateformat? Pin
Dotnetkanna19-May-10 22:44
Dotnetkanna19-May-10 22:44 
AnswerRe: Change SQL Server dateformat? Pin
Hristo-Bojilov19-May-10 22:55
Hristo-Bojilov19-May-10 22:55 
AnswerRe: Change SQL Server dateformat? Pin
T M Gray20-May-10 11:44
T M Gray20-May-10 11:44 
You shouldn't be passing strings to the database for dates. If you use parameterized queries the conversion happens for you automatically.

Parameterized Queries[^] This example only shows text, but if you use the following syntax it will do all the type checking before it gets to the database.
cmd.Parameters.Add("@MyDate", SqlDbType.DateTime);
cmd.Parameters["@MyDate"].Value = yourDateTimeVariable;


This is also the recommended way to do queries to prevent SQL injection attacks becuase it also handles things like single quotes and other things you would have to escape manually.
QuestionCreating Tables in Run time using c# Pin
Raghu_M19-May-10 22:33
Raghu_M19-May-10 22:33 
AnswerRe: Creating Tables in Run time using c# Pin
Pete O'Hanlon19-May-10 23:25
mvePete O'Hanlon19-May-10 23:25 
Questionhow to check operating system in c#..? Pin
NetMan201219-May-10 22:07
NetMan201219-May-10 22:07 
AnswerRe: how to check operating system in c#..? Pin
The Man from U.N.C.L.E.19-May-10 22:18
The Man from U.N.C.L.E.19-May-10 22:18 
AnswerRe: how to check operating system in c#..? Pin
Pete O'Hanlon19-May-10 22:30
mvePete O'Hanlon19-May-10 22:30 
AnswerRe: how to check operating system in c#..? Pin
Johnny J.19-May-10 22:33
professionalJohnny J.19-May-10 22:33 
AnswerRe: how to check operating system in c#..? Pin
Dave Kreskowiak20-May-10 1:29
mveDave Kreskowiak20-May-10 1:29 
AnswerRe: how to check operating system in c#..? Pin
Luc Pattyn20-May-10 3:00
sitebuilderLuc Pattyn20-May-10 3:00 
GeneralRe: how to check operating system in c#..? Pin
Pete O'Hanlon20-May-10 3:36
mvePete O'Hanlon20-May-10 3:36 
GeneralRe: how to check operating system in c#..? Pin
Luc Pattyn20-May-10 3:55
sitebuilderLuc Pattyn20-May-10 3:55 
GeneralRe: how to check operating system in c#..? Pin
Pete O'Hanlon20-May-10 3:59
mvePete O'Hanlon20-May-10 3:59 
GeneralRe: how to check operating system in c#..? Pin
Dave Kreskowiak20-May-10 6:35
mveDave Kreskowiak20-May-10 6:35 
GeneralRe: how to check operating system in c#..? Pin
Johnny J.20-May-10 21:01
professionalJohnny J.20-May-10 21:01 
GeneralRe: how to check operating system in c#..? Pin
Dave Kreskowiak21-May-10 1:45
mveDave Kreskowiak21-May-10 1:45 
AnswerRe: how to check operating system in c#..? Pin
canangirgin20-May-10 4:41
canangirgin20-May-10 4:41 
QuestionDisposing of object used in a UserControl... Pin
Shy Agam19-May-10 21:40
Shy Agam19-May-10 21:40 
AnswerRe: Disposing of object used in a UserControl... Pin
Pete O'Hanlon19-May-10 22:11
mvePete O'Hanlon19-May-10 22:11 

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.