SQL Server connection string "To few arguments"
I guess the solution is simple. I'm trying to connect to a SQL Express Server on my computer using the following line:
pConnection->Open("Data Source=PETERPAN\SQLEXPRESS;Initial Catalog=Mydata;User Id = Test;Password = Test;False");//(connectionstring,userID,pwd,longoption);
Two questions: Do I have to put every part of the connection string in "quotes" or simply the entire string? What is the "longoption" I am prompted for?
The error I get right now is: "To few arguments in function call"
I'm glad for any help. Have a nice day! Lump开发者_如何转开发i
You don't mention what language you are using, but I'm betting that last false is not a part of the connection string, but a second parameter to Open();
pConnection->Open("Data Source=PETERPAN\SQLEXPRESS;Initial Catalog=MyData", "Test", "Test", False);
check out the website connectionstrings. They'll give you a wide option of what to send to the database that you have. A copy-paste of these connectionstrings should work just fine. I think that the one closest to what you describe would be SQL Server 2008.
精彩评论