Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send update to SQL Server
Message
 
To
30/10/2003 12:35:49
Philip Jones
Cornwall County Council
Truro, United Kingdom
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00835189
Message ID:
00852916
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform