Environment versions
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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only