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--