You might want to try and use ADO to ocnnect to a sql server.
Dim rs AS NEW ADODB.Recordset. You will also need to have a connectstring,
connect="DataSource=ServerName;Provider=sqloledb.1;Password=user;User ID=user;Initial Catalog=databasename".
Once you have your ado object declared and the connect string established you will exec a sql statement like this,
rs.open "sql statement here", connect
And you will also have to make quite a few chnages to your queries etc as they need to conform to SQL Server standards, not Access. For example, no Format's in query strings. Peter Meachem
peter@accuflight.com
In addition, you may want to start converting all of your queries into stored procedures as they run faster than executing your queries in your code. Check out SQL Server online book for example of writing stored procedures.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.