CONNECT USING SQLCA;
if SQLCA.SQLCODE=-1 THEN
MESSAGEBOX("连接失败","数据库mydatabase连接失败!")
halt
end IF
transaction mytrans
mytrans=create transaction
mytrans.DBMS = "ODBC"
mytrans.AutoCommit = False
mytrans.DBParm = "ConnectString='DSN=myodbc;UID=sa;PWD='"
CONNECT USING mysqlca;
if mytrans.SQLCODE=-1 THEN
MESSAGEBOX("连接失败","数据库连接失败!")
halt
end IF