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 

SP input params disappear after execute

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Tom Ragé
Guest





PostPosted: Thu Feb 23, 2006 5:03 pm    Post subject: SP input params disappear after execute Reply with quote



Hi,
After executing a stored procedure my input params disappear
from the list of params? Is this normal behaviour?
Some details:
It's a D2005 dbexpress application with a FireBird1.5 server.
My remote DM has a DataSetProvider linked to a SQLStoredProc.
My client app can correctly fetch the params.
I have 1 input and 1 output param.
==CODE==
Mycds.Params[0].AsInteger := IdNr; //Params.count = 2
Mycds.Execute; //sets Params.count = 1
Result := Mycds.Params[1] ->List index out of bounds.
Result := Mycds.Params[0] //correct Output param

Ok, I can workaround by calling FetchParams everytime but I
assume this is not how its supposed to work.

Can anyone explain this?
Regards,
Tom.
Back to top
Peter Sawatzki
Guest





PostPosted: Fri Feb 24, 2006 9:03 pm    Post subject: Re: SP input params disappear after execute Reply with quote



Tom,

this is a problem since Delphi7. I reported this back then.

Peter

Tom Ragé wrote:

Quote:

Hi,
After executing a stored procedure my input params disappear
from the list of params? Is this normal behaviour?
Some details:
It's a D2005 dbexpress application with a FireBird1.5 server.
My remote DM has a DataSetProvider linked to a SQLStoredProc.
My client app can correctly fetch the params.
I have 1 input and 1 output param.
==CODE==
Mycds.Params[0].AsInteger := IdNr; //Params.count = 2
Mycds.Execute; //sets Params.count = 1
Result := Mycds.Params[1] ->List index out of bounds.
Result := Mycds.Params[0] //correct Output param

Ok, I can workaround by calling FetchParams everytime but I
assume this is not how its supposed to work.

Can anyone explain this?
Regards,
Tom.



--
Back to top
Esteban Pacheco
Guest





PostPosted: Sat Feb 25, 2006 8:03 pm    Post subject: Re: SP input params disappear after execute Reply with quote



Hi guys,

Finally i hear someone with the same problem.

Just like you my only solution was to call fetch params. Couldnt find a
pattern to reproduce the problem and report it.

Let us know if you find out the cause of it.


Thanks in advance.

Att.
Esteban Pacheco
http://estebanp.blogspot.com
A Delphi Programming Blog


"Tom Ragé" <tomrage (AT) softrage (DOT) be> wrote in message
news:43fdd9a2$1 (AT) newsgroups (DOT) borland.com...
Quote:

Hi,
After executing a stored procedure my input params disappear
from the list of params? Is this normal behaviour?
Some details:
It's a D2005 dbexpress application with a FireBird1.5 server.
My remote DM has a DataSetProvider linked to a SQLStoredProc.
My client app can correctly fetch the params.
I have 1 input and 1 output param.
==CODE==
Mycds.Params[0].AsInteger := IdNr; //Params.count = 2
Mycds.Execute; //sets Params.count = 1
Result := Mycds.Params[1] ->List index out of bounds.
Result := Mycds.Params[0] //correct Output param

Ok, I can workaround by calling FetchParams everytime but I
assume this is not how its supposed to work.

Can anyone explain this?
Regards,
Tom.



Back to top
Peter Sawatzki
Guest





PostPosted: Sun Feb 26, 2006 5:03 pm    Post subject: Re: SP input params disappear after execute Reply with quote

Esteban,

an alernative is to redefine the SQL stored procedure parameters on the
SQL server side as "InOut" instead of "In". But this workaround
obviously only works if you can modify the SP.

Peter


Esteban Pacheco wrote:

Quote:
Hi guys,

Finally i hear someone with the same problem.

Just like you my only solution was to call fetch params. Couldnt
find a pattern to reproduce the problem and report it.

Let us know if you find out the cause of it.


Thanks in advance.

Att.
Esteban Pacheco
http://estebanp.blogspot.com
A Delphi Programming Blog


"Tom Ragé" <tomrage (AT) softrage (DOT) be> wrote in message
news:43fdd9a2$1 (AT) newsgroups (DOT) borland.com...

Hi,
After executing a stored procedure my input params disappear
from the list of params? Is this normal behaviour?
Some details:
It's a D2005 dbexpress application with a FireBird1.5 server.
My remote DM has a DataSetProvider linked to a SQLStoredProc.
My client app can correctly fetch the params.
I have 1 input and 1 output param.
==CODE==
Mycds.Params[0].AsInteger := IdNr; //Params.count = 2
Mycds.Execute; //sets Params.count = 1
Result := Mycds.Params[1] ->List index out of bounds.
Result := Mycds.Params[0] //correct Output param

Ok, I can workaround by calling FetchParams everytime but I
assume this is not how its supposed to work.

Can anyone explain this?
Regards,
Tom.







--
Back to top
Tom Ragé
Guest





PostPosted: Mon Feb 27, 2006 10:03 am    Post subject: Re: SP input params disappear after execute Reply with quote

Thanks for the responses.
Tom.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) 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.