xtra "db_s"连mdb数据库成功,但如果改成sql数据库怎么连? 我写的这个代码那个地方有问题,版主帮帮忙!各位高手! 我的意思用xtra "db_s"这个xtras免费的!
下面是连mdb本地数据库
DB=New(xtra "db_s"
strDSN="MS Access Database"
nReadOnly = 0
nDatabase =Db_OpenDatabase(strDSN,0,"DRIVER={Microsoft Access Driver (*.mdb)};UID=;PWD=;DBQ="&the moviepath &"building.mdb"
下面是连sql的,但nDatabase为空,代码那个地方不对!帮帮忙!我的服务器在本地,数据库为db
DB=New(xtra "db_s"
strDSN="SQL Server"
nReadOnly = 0
nDatabase =Db_OpenDatabase(strDSN,0,"DRIVER={SQL Server};UID=sa;PWD=000000;SERVER=127.0.0.1;DBQ=db"