我是新手请问各位高手怎么用ini文件连接SQL库呀
怎么写呀代码和ini文件怎么写呀?
谢谢各位了!!!!!!!!!!!!!
我是新手请问各位高手怎么用ini文件连接SQL库呀
怎么写呀代码和ini文件怎么写呀?
谢谢各位了!!!!!!!!!!!!!
在INI文件里这样设置
[database]
DBMS=MSS Microsoft SQL Server 6.x
Database=csmd_new_hm
UserId=
DatabasePassword=
LogPassword=
ServerName=.
LogId=sa
Lock=
DbParm=
Prompt=0
在PB中这样写
DISCONNECT USING SQLCA ;
SQLCA.DBMS = ProfileString(gs_ini_path, "DataBase", "DBMS", " ")
SQLCA.Database = ProfileString(gs_ini_path, "DataBase", "DataBase", " ")
SQLCA.LogID = ProfileString(gs_ini_path, "DataBase", "LogID", " ")
SQLCA.LogPass = ProfileString(gs_ini_path, "DataBase", "LogPassword", " ")
SQLCA.ServerName = ProfileString(gs_ini_path, "DataBase", "ServerName", " ")
SQLCA.UserID = ProfileString(gs_ini_path, "DataBase", "UserID", " ")
SQLCA.DBPass = ProfileString(gs_ini_path, "DataBase", "DatabasePassword", " ")
SQLCA.Lock = ProfileString(gs_ini_path, "DataBase", "Lock", " ")
SQLCA.DbParm = ProfileString(gs_ini_path, "DataBase", "DbParm", " ")
CONNECT USING SQLCA ;