connectin string for sql server 2005

marks2007

Registered User.
Local time
Today, 10:50
Joined
Nov 12, 2007
Messages
31
I use Access connect to SQL Serevr 2005 database.

I try use different way to set the connection strion,but all of them are incorrect for cnConnection.Open strConnection .why?

Please help me

Mark


I try this:

strConnection = "Provider=SQLOLEDB;Data Source= ODYSSEY;Initial Catalog= MOP;UserId=mopcuser1;Password=mopcpwd1;"


strConnection = "ODBC;DRIVER={sql server};DATABASE = MOP " & _
";SERVER=ODYSSEY" & _
";UID=mopcuser1;PWD=mopcpwd1;"


strConnection = "Provider=MSDASQL; Driver={SQL Server}; Server=ODYSSEY; Database=MOP; UID=mopcuser1; PWD=mopcpwd1;"

strConnection = "Driver={SQL Server};Server=ODYSSEY;Trusted_Connection=no;Database=MOP;Uid=mopcuser1;Pwd=mopcpwd1;"
 
I have fixed this problem.Thanks
 

Users who are viewing this thread

Back
Top Bottom