Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server SP will not run
Message
 
 
À
01/02/2001 14:52:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00471411
Message ID:
00471419
Vues:
16
You may not have Execute permissions on the SP. When SQLExec returns -1, what information is returned when you use AError() to fill an array with the errors returned from SQL Server?

>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
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform