Article View: comp.lang.pascal.delphi.databases
Article #69Re: D3 & SLQA 5+ StoredProc not returning result set
From: Robert Cerny
Date: Tue, 19 Jan 1999 00:00
Date: Tue, 19 Jan 1999 00:00
47 lines
2307 bytes
2307 bytes
TStoredProc does not work well with odbc databases. Use TQuery instead:
Q.SQL.Add('call grouptest()');
Q.Open;
One thing that is puzzling me is "FUNCTION" in the error message.
Check if you have a function with the same name:
select * from sysprocedure where proc_name='grouptest';
A good practice is allways prefix a proc (a table too) with creator name:
call public.grouptest()
--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.cerny@neosys.xrs.qwe.si
No questions via email, unless explicitly invited.
Gaz wrote in message <36a4a6bb.12020484@news.demon.co.uk>...
>I'm using Delphi 3 c/s with SQL Anywhere 5.5 and
>I'm trying to run a simple Watcom SQL StoredProc that returns a 2
>column multiple row result set, but keep getting
>"Syntax Error - Wrong number of parameters to FUNCTION 'GroupTest'.
>
>The StoredProc component has picked up the two parameters defined and
>I assume will use these for passing multiple results back?
>
>This is the Procedure I am trying to call:
>
>alter procedure grouptest()
>result(base_group_id integer,description varchar(32))
>on exception resume
>begin
> select base_group_id,description
> from sims.base_group
> where base_group_type_id=12
>end
>
>if The same proc is converted to Transact SQL - the error is 'Trying
>to return a multiple row result set' (or something similiar).
>
>Any help on this would be appreciated,
>
>Gareth.
>
>Please remove the NOSPAM if you wish to reply by e-mail.
Technical Details
Message-ID:
<Jv7p2.28$8M1.313965@news.siol.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36a4a6bb.12020484@news.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ffff5,49835c688048482e X-Google-Attributes: gidffff5,public X-Google-Thread: 10de66,49835c688048482e X-Google-Attributes: gid10de66,public X-Google-Thread: ff75c,49835c688048482e X-Google-Attributes: gidff75c,public From: "Robert Cerny" <johnsmith@microsoft.com> Subject: Re: D3 & SLQA 5+ StoredProc not returning result set Date: 1999/01/19 Message-ID: <Jv7p2.28$8M1.313965@news.siol.net> X-Deja-AN: 434575249 References: <36a4a6bb.12020484@news.demon.co.uk> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 NNTP-Posting-Date: Tue, 19 Jan 1999 23:17:13 MET DST Newsgroups: comp.lang.pascal.delphi.databases,borland.public.delphi.database.desktop,borland.public.delphi.database.sqlservers