标题:请教:pb与SQL连接
只看楼主
wjcayh81
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-12-1
 问题点数:0 回复次数:1 
请教:pb与SQL连接

我是新手请问各位高手怎么用ini文件连接SQL库呀
怎么写呀代码和ini文件怎么写呀?
谢谢各位了!!!!!!!!!!!!!

搜索更多相关主题的帖子: SQL ini 文件 
2006-12-01 20:21
tzy21
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-7-9
得分:0 
回复:(wjcayh81)请教:pb与SQL连接

在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 ;

2007-07-09 16:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-106627-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012410 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved