主题:[求助]怎么定义一个新的连接事务
gpyzcp
[专家分:170] 发布于 2006-08-01 16:17:00
pb中用于与数据库连接的事务默认为SQLCA
怎么定义多一个连接事务出来呢
格式是怎么写
回复列表 (共3个回复)
沙发
blackcao0000 [专家分:30] 发布于 2006-08-02 09:59:00
transaction xxxxx
xxxxx = create transaction
string ls_inifile
ls_inifile = "aaaa.ini"
xxxxx.DBMS = ProfileString (ls_inifile, "DataBase DB", "dbms", "")
xxxxx.database = ProfileString (ls_inifile, "DataBase DB", "database", "")
xxxxx.userid = ProfileString (ls_inifile, "DataBase DB", "userid", "")
xxxxx.dbpass = ProfileString (ls_inifile, "DataBase DB", "dbpass", "")
xxxxx.logid = ProfileString (ls_inifile, "DataBase DB", "logid", "")
xxxxx.logpass = ProfileString (ls_inifile, "DataBase DB", "LogPassword", "")
xxxxx.servername = ProfileString (ls_inifile, "DataBase DB", "servername", "")
xxxxx.dbparm = ProfileString (ls_inifile, "DataBase DB", "dbparm", "")
板凳
潇洒老乌龟 [专家分:1050] 发布于 2006-08-02 17:02:00
怎样在一个程序中连接两个数据库
问:怎样在一个程序中连接两个数据库?数据库在两台机器中,一个是SQL6.5,一个是SQL7.0。
答:
Transaction mytrans1,mytrans2
mytrans1=Create Transaction
mytrans2=Create Transaction
mytrans1.DBMS="驱动程序类型"
mytrans1.DBParm="这里填连接Sql6.5的字串"
mytrans2.DBMS="驱动程序类型"
mytrans1.DBParm="这里填连接Sql7.0的字串"
connect using mytrans1;
connect using mytrans2;
3 楼
岚山 [专家分:320] 发布于 2006-08-28 19:53:00
楼上在代码上好象出了一点错误呀,应该是:
Transaction mytrans1,mytrans2
mytrans1=Create Transaction
mytrans2=Create Transaction
mytrans1.DBMS="驱动程序类型"
mytrans1.DBParm="这里填连接Sql6.5的字串"
mytrans2.DBMS="驱动程序类型"
mytrans2.DBParm="这里填连接Sql7.0的字串" //这行中原来写成了mytrans1了
connect using mytrans1;
connect using mytrans2;
我来回复