SQL vs Access DataBase

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have code that manipulates an Access DataBase using OLEDB, can I use
same OLEDB code for an SQL database with the exact schema if I just change
the Connection String?
 
Yes, but you need to make sure you're using the correct provider in your
connection string (PROVIDER="SQLOLEDB.1"). Be aware that there might be
syntactical differences between your Access Queries and SQL Queries. Also
when you move the database to SQL you need to make sure permissions are set
up correctly, etc.
 
Thanks.
--
Dennis in Houston


Michael C# said:
Yes, but you need to make sure you're using the correct provider in your
connection string (PROVIDER="SQLOLEDB.1"). Be aware that there might be
syntactical differences between your Access Queries and SQL Queries. Also
when you move the database to SQL you need to make sure permissions are set
up correctly, etc.
 
No problem. By the way, you might consider switching over to the SQL-Server
specific SqlClient. You can get better performance using the SqlClient as
opposed to plain vanilla OleDb. Some of your code will have to change in
that case, but it might be worth it for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top