Insert Exception Error

lothos12345

Well-known member
Joined
May 2, 2002
Messages
294
Location
Texas
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.
 
Use the following

Code:
Replace(Textbox1.Text, "", "")

At the point in your sql add this command, Change Textbox1.text to whatever your textbox is named

Andy
 
The error it is giving me is "An unhandled exception of type System.Data.OleDb.OleDbException occured in System.data.dll"
 
Back
Top