Versions des environnements
Network:
Windows 2000 Server
db=CREATEOBJECT("Dbpro")
?db.connhandle
db.connDB
**SQLEXEC(db.connhandle,"select * from xy",'xy_temp')
**BROWSE
dm='003'
mc='计算机科学与通信工程学院'
SQLEXEC(db.connhandle,"execute sp_insertdata ?dm,?mc")
db.disconnDB
DEFINE CLASS Dbpro as Custom
connhandle=0
PROCEDURE connDB()
this.connhandle=SQLSTRINGCONNECT('driver=SQL Server;server=(local);database=CET;uid=****;pwd=******;trusted_connection=no')
IF this.connhandle>0
MESSAGEBOX('连接成功!',64,'sql server数据源')
ELSE
MESSAGEBOX('连接失败!',64,'sql server数据源')
ENDIF
ENDPROC
PROCEDURE disconnDB()
SQLDISCONNECT(this.connhandle)
MESSAGEBOX('删除连接成功!',64,'sql server数据源')
ENDPROC
ENDDEFINE
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement