Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to send update to SQL Server
Message
 
À
30/10/2003 12:35:49
Philip Jones
Cornwall County Council
Truro, Royaume Uni
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00835189
Message ID:
00852916
Vues:
18
Hi Philip - see if this helps...
PUBLIC gnConnHandle
LOCAL llConnected, lcCommand
STORE -1 TO gnConnHandle
STORE .F. TO llConnected
STORE "" TO lcCommand
=SQLSETPROP(0, "DispWarning", .F.)
=SQLSETPROP(0, "DispLogin", 3)
STORE SQLSTRINGCONNECT("DRIVER=SQL Server;SERVER=PREXP01;UID=user;PWD=pass;APP=Microsoft® Visual FoxPro®;WSID=PREXP01;DATABASE=Northwind") TO gnConnHandle
IF gnConnHandle < 0
   =MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
   =MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
   llConnected = .T.
ENDIF
IF llConnected THEN
	lcCommand = "exec CustOrdersOrders 'ALFKI'"
	=SQLEXEC(gnConnHandle, lcCommand, "curTemp")
	SELECT curTemp
	BROWSE
	USE IN curTemp
	=SQLDISCONNECT(gnConnHandle)
ENDIF
It calls the CustOrdersOrders stored procedure, passing in the customer id...
Chris Maiden
Email
Web
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform