Click here to Skip to main content
16,008,010 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating object Pin
Colin Angus Mackay19-Jun-06 5:29
Colin Angus Mackay19-Jun-06 5:29 
GeneralRe: Creating object Pin
BoneSoft19-Jun-06 5:42
BoneSoft19-Jun-06 5:42 
GeneralRe: Creating object Pin
LongRange.Shooter20-Jun-06 17:24
LongRange.Shooter20-Jun-06 17:24 
Questiongetting day of the date Pin
SR Ranjini18-Jun-06 22:55
SR Ranjini18-Jun-06 22:55 
AnswerRe: getting day of the date Pin
rah_sin18-Jun-06 23:25
professionalrah_sin18-Jun-06 23:25 
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 
innocent73 wrote:
Dear friends is it really impossible to insert or update a smalldatetime column?


It is perfectly possible - But first you may want to address some deeper concerns. You should use parameterised queries for a number of reasons the main one is that it is more secure and less susceptable to a SQL Injection Attack (your code is highly suscetable to a SQL Injection Attack). Also it makes things easier to read.

See: SQL Injection Attacks and Tips on How to Prevent Them[^]


innocent73 wrote:
" MaintEntryDate =Convert.ToDateTime(cMaintEntry.Text)";


SQL server knows nothing of Convert.ToDateTime(cMaintEntry.Text) because that is C# code. If you continue in the way you have written your code so far, you just need to inject the text without conversion (but you have to assume that the text is in the correct format already). Alternatively you can pass a date in as a parameter (see the above linked article to see how) and secure your system at the same time.


Scottish Developers events:
* .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy
* Developer Day Scotland: are you interested in speaking or attending?

My: Website | Blog
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 
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 

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.