I'm scratching my head over this one.
Dim fn as String
Set MyDB = OpenDatabase("", dbDriverNoPrompt, False,
"ODBC;DSN=sample-MySQL;DB=mysql;SERVER=192.168.201.1;UID=whatever;PWD=whatever;PORT=3306;option=35;"
& dbLangGeneral)
Set MyRS = MyDB.OpenRecordset("MyTable", , dbSQLPassThrough)
fn = "This is a string with a ' in it"
Criteria = "Path = '" & fn & "'"
MyRS.FindFirst Criteria
Returns "Syntax error (missing operator) in expression" If I replace the "'" with "\'" it
still gives me the same error! Any clues
here? It's gotta be something simple that I'm missing here...
sql,mysql,myodbc
VB 6.0, MySQL 3.23.32, MyODBC 2.50.33