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 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;"