Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call SQL stored procedure in VFP9
Message
From
07/12/2007 00:54:23
 
 
To
06/12/2007 23:56:20
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01273206
Message ID:
01273832
Views:
17
Hi Yim Ming,
STORE SQLCONNECT('vitalscan', 'sa', 'Wilson123') TO gnConnHandle
IF gnConnHandle <= 0
   = MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
   = MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
 * lnRetVal = SQLEXEC(gnConnHandle, [EXEC FindInvoice '03/12/2007', '03/12/2007'])
lnRetVal = SQLEXEC(gnConnHandle, [EXEC FindInvoice '03/12/2007', '03/12/2007'],"ret_cursor")
if lnRetVal>=1  && a SP can return more than one recordset relying on how many Select statements without Into.The returned result -cursor names will
be Ret_cursor,Ret_cursor1,Ret_cursor2,...,Ret_cursorN    
   select Ret_cursor
   brow
endif 
=SQLCANCEL(gnConnHandle)  
   = SQLDISCONNECT(gnConnHandle)
ENDIF
Steven
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform