如何使用.ini文件???????

lwbmail 2003-12-12 09:09:23
编程虫想问各位高手:
   在pb里,动态连接数据库时,如何写ini文件,并且怎样用函数调用
...全文
34 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
klbt 2003-12-12
  • 打赏
  • 举报
回复
调用方法:
as_inifile = "a.ini"

SQLCA.DBMS = ProfileString(as_inifile, "Database", "DBMS", " ")
SQLCA.Database = ProfileString(as_inifile, "Database", "DataBase", " ")
SQLCA.LogID = ProfileString(as_inifile, "Database", "LogID", " ")
SQLCA.LogPass = ProfileString(as_inifile, "Database", "LogPassword", " ")
SQLCA.ServerName = ProfileString(as_inifile, "Database", "ServerName", " ")
SQLCA.UserID = ProfileString(as_inifile, "Database", "UserID", " ")
SQLCA.DBPass = ProfileString(as_inifile, "Database", "DatabasePassword", " ")
SQLCA.Lock = ProfileString(as_inifile, "Database", "Lock", " ")
SQLCA.DbParm = ProfileString(as_inifile, "Database", "DbParm", " ")

Connect Using Sqlca;
klbt 2003-12-12
  • 打赏
  • 举报
回复
用SQLServer举例:

[Database]
DBMS = MSS Microsoft SQL Server 2000
ServerName = XXXXXX
Database = XXX
DbParm = ""
UserId =
DatabasePassword =
LogId = sa
LogPassword =
Lock =
Prompt = 0

754

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧