Hi James,
The sp as written, uses the second parameter as OUTPUT and no return cursor. I decided to add a line at the end of the proc to create a cursor. Works in SQL Server, hopefully it'll work in Sybase. I'll find out Monday. Thanks for the reply.
Gary
>Hi Gary
>
>Are you using ASE or ASA? If latter then you don't need the last parameters at all. It returns the cursor just like using a select statement. I have no experience with ASE so I can't say for sure but it might work the same.
>
>
>>Hi all,
>>I'm converting a VFP/MS SQL Server app to run against Sybase. It's SO close to being the same, but not exactly. The last problem, I hope, is calling a Sybase stored procedure and getting a return value. With MS SQL Server I use the following:
>>cVal = ''
>>SQLEXEC(nConnection,[execute gp_getnextno 'client_id', ?@cVal])
>>? cVal && Set to next key value
>>
>>Works like a champ. Sybase fails. I can call the sp from Sybase Advantage and it works like MS SQL Server, i.e.,
>>
>>declare @cVal char(12)
>>select @cVal = ''
>>execute gp_getnextno 'client_id', cVal output
>>print @cVal
>>
>>If I call Sybase from VFP like:
>>SQLEXEC(nConnection,[execute gp_getnextno 'client_id', ?cVal]) - Returns -1
>>SQLEXEC(nConnection,[execute gp_getnextno 'client_id', @cVal]) - Returns -1
>>SQLEXEC(nConnection,[execute gp_getnextno 'client_id', cVal]) - Returns 1
>>
>>I get a 1 as return code for the last example, but, of course, cVal is unchanged. Not too useful.
>>
>>Anyone with experiance with this? Or suggestions? Thanks.
>>
>>
>>Gary
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only