Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a Custom Class Method for SPT call
Message
De
07/07/2005 04:38:40
 
 
À
27/06/2005 10:03:26
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01026700
Message ID:
01029853
Vues:
14
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
Fil
Voir

Click here to load this message in the networking platform