高分,PB8如何在应用程序中连接MSSQL2000?(50分)

  • 主题发起人 主题发起人 dotboy
  • 开始时间 开始时间
D

dotboy

Unregistered / Unconfirmed
GUEST, unregistred user!
INI文件是从PB8中Export出来的
[DataBase]
DBMS=MSS Microsoft SQL Server 6.x
Database=
UserId=
DatabasePassword=
LogId=sa
LogPassword=sql
ServerName=localhost
DBParm=
Lock=
Prompt=FALSE
AutoCommit=FALSE

应用程序:
sqlca.DBMS = ProfileString ("smis.ini", "DataBase", "DBMS", "")
sqlca.database = ProfileString ("smis.ini", "DataBase", "Database", "")
sqlca.userid = ProfileString ("smis.ini", "DataBase", "UserId", "")
sqlca.dbpass = ProfileString ("smis.ini", "DataBase", "Databasepassword", "")
sqlca.logid = ProfileString ("smis.ini", "DataBase", "LogId", "")
sqlca.logpass = ProfileString ("smis.ini", "DataBase", "LogPassword", "")
sqlca.servername = ProfileString ("smis.ini", "DataBase", "ServerName", "")
sqlca.dbparm = ProfileString ("smis.ini", "DataBase", "DBParm", "")
connect;
if sqlca.sqlcode<>0 then
messagebox("错误","数据库连接错误")
return
end if

每次都连接错误,是哪里有问题呀???大虾帮忙。
 
SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "sscrm_demo"
SQLCA.ServerName = "test-srv"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = ""
connect;
if sqlca.sqlcode<>0 then
messagebox("错误","数据库连接错误")
return
end if

open(w_1)
我这样没错,你直接写在程序里有没有错,另外把错误信息和代码Show出来看看到底是怎么回事
 
INI文件是从PB8中Export出来的
[DataBase]
DBMS=MSS Microsoft SQL Server 6.x
Database=
UserId=
DatabasePassword=
LogId=sa
LogPassword=sql
ServerName=localhost
DBParm=
Lock=
Prompt=FALSE
AutoCommit=FALSE

将各项值填正确即可!
 
后退
顶部