Jump to content

Recommended Posts

Posted (edited)

Example code 

$adoCon = ObjCreate("ADODB.Connection")
$adoRs = ObjCreate ("ADODB.Recordset")
$adoRs.CursorType = 1
$adoRs.LockType = 3
$adoCon.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & @ScriptDir&"\data.mdb;") ;Use this line if using MS Access 2003 and lower

;$string = "ABCDEF"     ; not error
$string = "AB'CDEF"     ; error

$adoCon.execute( "INSERT INTO STR VALUES ('" &$string& "')")

$adoCon.Close

Help me  this code. Get error if ' character in $string  

Thank . 

 

Edited by 123disconnect

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...