Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening MySQL table from Microsoft Access

Status
Not open for further replies.

PeDa

Technical User
Oct 10, 2002
227
0
0
NL
I have the following string:

Code:
SELECT * FROM tbtimes WHERE (eEvent LIKE '%align=\'center\'%') ORDER BY eOrder

which behaves as expected (finds records containing: align='center') when run from phpMyAdmin.

However the following in Microsoft Access gives VBA error 3075: Syntax Error (Missing Operator) in Query Expression (eEvent LIKE '%align=\'center\'%')

Code:
Set rst = dbf.OpenRecordset("SELECT * FROM tbtimes WHERE (eEvent LIKE '%align=\'center\'%') ORDER BY eOrder")

What am I doing wrong here? (general procedure works fine in other cases)
 
Answered my own question (Access and MySQL escape mixed up). Should be:

Code:
SELECT * FROM tbtimes WHERE (eEvent LIKE '%align=''center''%') ORDER BY eOrder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top