A few simple SQL Server questions

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 !

NorthWind
07-10-2002, 01:37 PM
Properties("Data Source").Value = "MyServer"

write the ip adress of the server in the data source.

Mike
07-10-2002, 08:05 PM
I loaded the latest MDAC 2.6 and it resolved everything. I haven't loaded MDAC 2.7 because I heard that it may have a few glitches. If you have any comments on the issue, I would appreciate hearing them.

Thanks to everyone who cared to take the time to read the original post.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum