Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem running a stored Procedure in SQL Server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01097803
Message ID:
01097815
Vues:
13
You should use AERROR() function to get ODBC error info which could help in troubleshhoting.

>
>I can connect to a SQL server using the following commands
>
>cConnString = "DRIVER={SQL Server};SERVER=xxx.xxx.xx.xx;database=testdb;uid=sa;pwd=password"
>
>nSqlHandle = SQLSTRINGCONNECT(cConnString,.t.)
>
>
>I can also issue a a select statement through sqlexec and get the correct results from the following
>
>? SQLEXEC(nSqlHandle,"select b2b from clients where retailerid='100' and password='password'")
>? b2b
>
>
>the stored procedure
>
>CREATE PROCEDURE dbo.SEL_AllowB2B  AS
>select b2b from clients where retailerid = '100' and password = 'password'
>GO
>
>
>I cannot run a stored procedure I get a -1 returned from the following command
>
>? SQLEXEC(nSqlHandle,'SEL_AllowB2B')
>
>
>I've tried quite a few variations of the previous command with no luck.
>
>Any ideas?
>
>Thank you,
>Paul
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform