lothos12345 Posted September 11, 2003 Posted September 11, 2003 I have a program which interacts with a Microsoft Access Database. The program is written in VB.NET. One of the textboxes on the form that inserts data into the database cannot take any type of puncutation no commas, apostphres etc.... if there is a puncutation in this textbox when the user clicks save the insert command throws an Exception. This is the only textbox on the form that the user cannot enter puncutation. It is not the database either, all the fields in there take puncutation when you enter it in directly to the table. All the fields in the database are regular text fields. But for some reason this field cannot take puncutation coming from the programs textbox. Unclear why it is happening. Any help would be greatly appreiciated. Quote
Administrators PlausiblyDamp Posted September 11, 2003 Administrators Posted September 11, 2003 What exception does it throw? What error message does it give? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
a_jam_sandwich Posted September 11, 2003 Posted September 11, 2003 Use the following Replace(Textbox1.Text, "'", "''") At the point in your sql add this command, Change Textbox1.text to whatever your textbox is named Andy Quote Code today gone tomorrow!
lothos12345 Posted September 11, 2003 Author Posted September 11, 2003 The error it is giving me is "An unhandled exception of type System.Data.OleDb.OleDbException' occured in System.data.dll" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.