简体   繁体   中英

connect sql2005 database from vc++

I want to connect my application with sql server2005 express and my application on vs2008.

the connection string is:

db.Open(NULL, FALSE, FALSE, _T("ODBC;Driver={SQL Native Client};Server=ESS10\SQLEXPRESS;Database=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\\testingsql.mdf;Trusted_Connection=yes;")))

but when I debug the code the pop box open.

在此处输入图片说明 Any one suggest that how to resolve this problem.

It says, Named Pipes isnt enabled, check what options you have. Chances are tcp is enabled so you can do

Server=tcp:ESS10\\SQLEXPRESS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM