LostProgrammer
Well-known member
- Joined
- Jan 17, 2003
- Messages
- 123
Hello everyone, thanks for the help on my last problem.
My problem is this. When I pass my variables to the sql server, one of the strings has a chunk of text and if the user puts a in the string it makes my program crash. So lets say the user enters for my string variable reason = "Didnt make it on time" the in didnt would crash my program. Here is my code.
commsql.CommandText = "INSERT INTO TIMELOG ([USERNAME],[LOGTIME],[REASON]) VALUES (" + username + "," + loginTime + "," + reason + ")"
Anyone have any ideas on that one?
Thanks much
LostProgrammer
My problem is this. When I pass my variables to the sql server, one of the strings has a chunk of text and if the user puts a in the string it makes my program crash. So lets say the user enters for my string variable reason = "Didnt make it on time" the in didnt would crash my program. Here is my code.
commsql.CommandText = "INSERT INTO TIMELOG ([USERNAME],[LOGTIME],[REASON]) VALUES (" + username + "," + loginTime + "," + reason + ")"
Anyone have any ideas on that one?
Thanks much
LostProgrammer