Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a Custom Class Method for SPT call
Message
From
07/07/2005 04:38:40
 
 
To
27/06/2005 10:03:26
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026700
Message ID:
01029853
Views:
16
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
Map
View

Click here to load this message in the networking platform