回 帖 发 新 帖 刷新版面

主题:如何在程序中动态打开和关闭数据库?

紧急,先谢谢了。

回复列表 (共4个回复)

沙发

动态打开用connect
关闭用disconnect

板凳

在应用程序的open事件中,选把profile的内容写入,再加入connect usign sqlca;

3 楼


可以用 connect using SQLCA;连接
       disconnect using SQLCA;断开连接
或者象潇洒老乌龟 说的那样
      connect;连接
      disconnect;断开连接

4 楼


SQL Server连接

disconnect;

SQLCA.DBMS = "MSS Microsoft SQL Server"
SQLCA.Database = ""
SQLCA.LogPass =''
SQLCA.ServerName = ""
SQLCA.LogId = ""
SQLCA.AutoCommit = 
SQLCA.DBParm = ""

connect;


disconnect;

ORACLE连接
SQLCA.DBMS = ""
SQLCA.LogPass =''
SQLCA.ServerName = ""
SQLCA.LogId = ""
SQLCA.AutoCommit = False
SQLCA.DBParm = ""

connect;

我来回复

您尚未登录,请登录后再回复。点此登录或注册