Mike
07-10-2002, 12:05 PM
1. So far, I have been using Win NT Security. But now, I want to connect using SQL Server authentication using:
with conMyConnection
.Provider = "SQLOLEDB"
.Properties("Data Source").Value = "MyServer"
.Properties("Initial Catalog").Value = "MyDatabase"
.Properties("User ID").Value = "MyUser"
.Properties("Password").Value = "MyPwd"
.Open
end with
But I keep getting a "Not associated with a trusted SQL Server connection" on the Open line. Actually, I get the same message when trying to import data to a database from Enterprise Manager.
The server is set up to accept SQL Server authentication. The server Login is set up for SQL Server authentication and has all the rights to the database that I try to connect to. The database includes the Login as a User with all rights. So I really don't know what's missing.
2. I have left my recorset opening code unchanged with respect to opening from an Access db and I am using adOpenStatic. Unlike Jet, it would seem that Recordcount, Bookmark and positioning are not supported by the provider. I did not specify the CursorLocation, so adUseServer is used by default. Why is the SQL Server reacting differently from Jet for the exact same code? My understanding is that Recordcount is not supported only when the cursor is dynamic but is always supported when it is static, along with bookmarks. Am I in left field?
Thanks !
with conMyConnection
.Provider = "SQLOLEDB"
.Properties("Data Source").Value = "MyServer"
.Properties("Initial Catalog").Value = "MyDatabase"
.Properties("User ID").Value = "MyUser"
.Properties("Password").Value = "MyPwd"
.Open
end with
But I keep getting a "Not associated with a trusted SQL Server connection" on the Open line. Actually, I get the same message when trying to import data to a database from Enterprise Manager.
The server is set up to accept SQL Server authentication. The server Login is set up for SQL Server authentication and has all the rights to the database that I try to connect to. The database includes the Login as a User with all rights. So I really don't know what's missing.
2. I have left my recorset opening code unchanged with respect to opening from an Access db and I am using adOpenStatic. Unlike Jet, it would seem that Recordcount, Bookmark and positioning are not supported by the provider. I did not specify the CursorLocation, so adUseServer is used by default. Why is the SQL Server reacting differently from Jet for the exact same code? My understanding is that Recordcount is not supported only when the cursor is dynamic but is always supported when it is static, along with bookmarks. Am I in left field?
Thanks !