Board index » delphi » Stored Procedure in D2005

Stored Procedure in D2005


2006-02-14 01:15:03 PM
delphi270
Hi All,
I have written a stored procedure in MS SQL Enterprise Manager v8.0. it is a
select query to return a result set. I am trying to access this stored
procedure through D2005 web service, BDPConnection object and BDPCommand are
used in this module.
During the design time I can execute the stored procedure via 'Stored
Procedure Dialog' and by checking the 'Stored Procedure has one or more
resultset' checkbox. But it does not return any result during the runtime.
How to set the value of 'Stored Procedure has one or more resultset'
checkbox at runtime? Please help.
Thanks,
Sumathi.
 
 

Re:Stored Procedure in D2005

Am Tue, 14 Feb 2006 10:45:03 +0530 schrieb Sumathi:
Quote
Hi All,

I have written a stored procedure in MS SQL Enterprise Manager v8.0. it is a
select query to return a result set. I am trying to access this stored
procedure through D2005 web service, BDPConnection object and BDPCommand are
used in this module.

During the design time I can execute the stored procedure via 'Stored
Procedure Dialog' and by checking the 'Stored Procedure has one or more
resultset' checkbox. But it does not return any result during the runtime.
How to set the value of 'Stored Procedure has one or more resultset'
checkbox at runtime? Please help.

Thanks,
Sumathi.
Hmm, i don't know exactly what you mean with "during the runtime". But put
a "SET NOCOUNT ON" as first line in your stored proc, then you should get a
result set back.
bye, Helmut
 

Re:Stored Procedure in D2005

Hi,
There was some problem with the way I set the parameter for BDPCommand
component in D2005. Once I fix that, I got it working.
Thanks for your response.
Sumathi.
"helmut woess" <XXXX@XXXXX.COM>writes
Quote
Am Tue, 14 Feb 2006 10:45:03 +0530 schrieb Sumathi:

>Hi All,
>
>I have written a stored procedure in MS SQL Enterprise Manager v8.0.
It's a
>select query to return a result set. I am trying to access this stored
>procedure through D2005 web service, BDPConnection object and BDPCommand
are
>used in this module.
>
>During the design time I can execute the stored procedure via 'Stored
>Procedure Dialog' and by checking the 'Stored Procedure has one or more
>resultset' checkbox. But it does not return any result during the
runtime.
>How to set the value of 'Stored Procedure has one or more resultset'
>checkbox at runtime? Please help.
>
>Thanks,
>Sumathi.

Hmm, i don't know exactly what you mean with "during the runtime". But put
a "SET NOCOUNT ON" as first line in your stored proc, then you should get
a
result set back.

bye, Helmut