List:MySQL ODBC« Previous MessageNext Message »
From:Ed Carp Date:July 20 2002 4:39am
Subject:V 6.0 DAO FindFirst returns error
View as plain text  
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

Thread
V 6.0 DAO FindFirst returns errorEd Carp20 Jul
  • Re: V 6.0 DAO FindFirst returns errorJames Treworgy21 Jul
    • RE: V 6.0 DAO FindFirst returns errorRob McQualter22 Jul
    • RE: V 6.0 DAO FindFirst returns errorEd Carp22 Jul
  • Re: V 6.0 DAO FindFirst returns errorArthur Fuller22 Jul