Jump to content

VB6 SQL INSERT


Guest JDT_71

Recommended Posts

Does anyone here know how to solve the following problem in the context of a VB6 program using an ADO Recordset?Dim sSQL As StringDim Var As StringsSQL = "INSERT INTO table VALUES ('" & Var & "')" The problem arises if the value of Var contains a single quote character. For example: Jim's car. sSQL is set to : INSERT INTO table VALUES('Jim's car'). Thanks in advance for any responses.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...