BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Convert Sybase SQLAnywhere Stored proc to SQL Server 2005

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Rhea Grason
Guest





PostPosted: Tue Mar 27, 2007 11:04 pm    Post subject: Convert Sybase SQLAnywhere Stored proc to SQL Server 2005 Reply with quote



I am converting all my databases from Sybase SQLAnywhere to SQL Server 2005. I am working on converting a stored procedure at the moment. I got the stored proc converted but am having trouble using it in my app. I have three input variables and three output variables. When I connected the stored proc to an ADOStoredProc component it lists all my variables as parameters but also lists the first paramter as "@RETURN_VALUE". What is this parameter? It also has the Direction as "pdInputOutput" for my output variables instead of just "pdOutput". When I try to execute the stored proc from my app I get this error: 'List index out of bounds(1)'. I have the first input parameter as index 1 because it is listing the @RETURN_VALUE as the first parameter. Is using an ADO stored proc that much different than using a TStoredProc? What am I missing? Thanks.
Back to top
Bob Dawson
Guest





PostPosted: Wed Mar 28, 2007 9:00 pm    Post subject: Re: Convert Sybase SQLAnywhere Stored proc to SQL Server 200 Reply with quote



"Rhea Grason" wrote
Quote:
first paramter as "@RETURN_VALUE". What is this parameter?

Generally zero or an error code. It will always be param[0]

Quote:
It also has the Direction as "pdInputOutput" for my output
variables instead of just "pdOutput".

You should fix that to pdOutput if that's what they are.

Quote:
Is using an ADO stored proc that much different than using
a TStoredProc? What am I missing? Thanks.

Yes--there are some behavior differences. Are you setting up all the SPs at
design time, or doing anything at runtime?
Is the out of bounds error firing when you're assigning the pdInput values,
or when you're trying to read the outputs?

bobD
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.