I am writing an application to migrate data from Access to SQL using VB6 and ADO. According to all the documentation I can find, I can force the user to open the databases exclusively by setting the Mode property of the connections to adModeShareExclusive before opening them.
This works fine for the Access database but not the SQL database. I have opened the SQL database with Enterprise Manager or Access 2000, and even had a co-worker open the database on a network server. When I then open the same database in code, I do not get an error and I can add records. This is the connection string:
"Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=<DatabaseName>;Data Source=<ServerName>"
Is it necessary to use a user name and password in order to make the adModeShareExclusive work? If not, can anybody suggest what I'm doing wrong?
Thanks
This works fine for the Access database but not the SQL database. I have opened the SQL database with Enterprise Manager or Access 2000, and even had a co-worker open the database on a network server. When I then open the same database in code, I do not get an error and I can add records. This is the connection string:
"Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=<DatabaseName>;Data Source=<ServerName>"
Is it necessary to use a user name and password in order to make the adModeShareExclusive work? If not, can anybody suggest what I'm doing wrong?
Thanks