Connection string sql native client 1010/4/2023 You can upgrade all your Microsoft SQL Server connections to use the ODBC. Messagetext = _T("open, database:") + database. The server name and database name are retrieved from the connect string if you. database.Open(NULL, FALSE, FALSE, connectionstring, FALSE) //okĭatabase.OpenEx(connectionstring, CDatabase::noOdbcDialog) //ok ![]() Provider=sqloledb Data Source=MYPC Integrated Security=SSPI ĭatabase.OpenEx(_T("Driver = Server=localhost Trusted_Connection=yes ") So I changed the connection to SQL Server to the following code: CDatabase Database However, now it is said that ADO is outdated and ODBC is recommended again by Microsoft (see ), so I have to modify my code to use ODBC instead. Where MYPC is the name of my computer, and SQL Server is installed on my computer as the default instance. ![]() ![]() ![]() In the past, I have used ADO to access SQL Server, the connection string for the ADO connection object is: Provider=sqloledb Data Source=MYPC Integrated Security=SSPI
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |