I'm trying to make the same SQL statment work when connected to either an Access database, or a MS SQL server, using ADO.

Problem: Single vs. double quotes.

SELECT * FROM MyTable WHERE Str = "yada"

Runs on Access, but not SQL server...

SELECT * FROM MyTable WHERE Str = 'yada'

Runs on Sql Server but not Access.

Is there ANYTHING I can place into my Access connection string that will put me in "Single quote" mode?

I KNOW that the jet engine supports either option, but not both at the same time. I KNOW how to set the single/double options using DAO, but not ADO (2.5 -> 2.7)

Here is my (simple) access connection string:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\myServer\MyPath\MyDB.mdb

Thanks for your help!

Note on DAO.

If you...
Dim DB as Database
Db.open("SQL STATMENT") then you use double quote.

If you...

DbEngine(0)(0).Execute "SQL STATMENT" Then you use single quotes.