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

C#

 
QuestionVSS and Visual studio Pin
Zeyad Jalil20-May-10 0:25
professionalZeyad Jalil20-May-10 0:25 
AnswerYou have a habit of asking none C# questions in this forum. Would you please not do that? Pin
Pete O'Hanlon20-May-10 0:42
mvePete O'Hanlon20-May-10 0:42 
QuestionHow to create Contact form with C# in ASP.NET Pin
BasPoldervaart19-May-10 23:15
BasPoldervaart19-May-10 23:15 
AnswerRe: How to create Contact form with C# in ASP.NET Pin
Arun Jacob19-May-10 23:31
Arun Jacob19-May-10 23:31 
Questiondecimal question Pin
Jassim Rahma19-May-10 23:14
Jassim Rahma19-May-10 23:14 
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 

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.