如何从ini文件连接数据库?
各位大侠:小弟刚刚学PB没多久,我想请教一下如何动态连接SQL库呀(从ini文件里怎样配置)?
那你说的是、不是这个,,
sqlca.dbms=profilestring("iccard.ini","database","dbms","")
sqlca.database=profilestring("iccard.ini","database","database","")
sqlca.userid=profilestring("iccard.ini","database","userid","")
sqlca.dbpass=profilestring("iccard.ini","database","dbpass","")
sqlca.dbparm=profilestring("iccard.ini","database","dbparm","")
sqlca.autocommit=false
connect using sqlca;
if sqlca.sqlcode<>0 then
messagebox("提示","数据库连接失败")
return
end if
open(w_child1)