 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
DA Brookes Guest
|
Posted: Wed Jul 21, 2004 2:57 pm Post subject: Obtaining result from a storred procedure (D6e, MSSQL, ado) |
|
|
Hi appologies for the long post.
I have the following stored procedure
CREATE PROCEDURE wc_name
@con_ref varchar(10),
@group_no varchar(3),
@wc_no varchar(6)
as
set nocount on
select d10, wc_desc, scope from dbo.wclist
where con_ref = @con_ref and group_no = @group_no and wc_no = @wc_no
GO
----------------------------------------------------
How do I obtain a result for "wc_desc" from the above..?
I have tried adding a parameter for output, but the best I can get is zero,
when there is a company name displayed when I try the same input in the
MS-SQL debugger.
with adostoredproc1 do
begin
label63.caption := label9.caption + label56.Caption;
parameters[1].Value := 'NB-75020'
parameters[2].Value := '001'
parameters[3].Value := 'B04';
execproc;
label62.caption := adostoredproc1wc_desc.value;
end;
Anyone have any ideas / examples ?
Regards
Dave
|
|
| Back to top |
|
 |
Kevin Frevert Guest
|
Posted: Wed Jul 21, 2004 3:10 pm Post subject: Re: Obtaining result from a storred procedure (D6e, MSSQL, a |
|
|
"DA Brookes" <david_dot_brookes_at_interserveprojects.com> wrote
| Quote: |
with adostoredproc1 do
begin
label63.caption := label9.caption + label56.Caption;
parameters[1].Value := 'NB-75020'
parameters[2].Value := '001'
parameters[3].Value := 'B04';
execproc;
label62.caption := adostoredproc1wc_desc.value;
end;
Anyone have any ideas / examples ?
Regards
Dave
|
Dave,
Use the Open method instead of ExecProc.
Good luck,
krf
|
|
| Back to top |
|
 |
DA Brookes Guest
|
Posted: Thu Jul 22, 2004 7:21 am Post subject: Re: Obtaining result from a storred procedure (D6e, MSSQL, a |
|
|
Thanks Kevin!
Regards
Dave
|
|
| Back to top |
|
 |
|
|
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
|
|