Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server SP will not run
Message
From
01/02/2001 14:52:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SQL Server SP will not run
Miscellaneous
Thread ID:
00471411
Message ID:
00471411
Views:
62
I cannot get a SQL Server stored proc that returns data rows to execute using SQLEXEC(). I reduced the problem down to the simplest SELECT * FROM ... in a test SP to test it. The test SP runs fine from Query Analyzer, and the SELECT command itself runs from VFP when executed using SQLEXEC(), but the SP will not run from VFP using SQLEXEC(). I know I've done this before and the Help examples are simple. I'm missing something incredibly simple ... or stupid. :-)

Code details below.

Test SP code:
CREATE PROCEDURE dbo.WBC2_Test AS
SELECT * FROM usPhone_T
VFP SP Test code:
h = GetConnection() && gets a connection and I know it works
ret = SQLEXEC( h, "EXECUTE WBC2_Test" )  && ret returns -1
?SQLDISCONNECT(h)  && returns 1
VFP SELECT test code:
h = GetConnection() && gets a connection and I know it works
ret = SQLEXEC( h, "SELECT * FROM usPhone_T" )  && shows cursor & ret returns 1
?SQLDISCONNECT(h)  && returns 1
What in the world am I missing here??

Thanks,
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Next
Reply
Map
View

Click here to load this message in the networking platform