Visual Basic and ADO With CLI SDK 2.4
Posted in 2000
Topics: SQL Development & Query Writing, Stored Procedures & SPL
Can anybody advise, from experience, on what the contents of a simple Informix Stored Procedure would look like to return the entire contents of an SQL Select statement to an ADO recordset in VB would look like. I am more than happy with executing stored procedure from VB, but am unfamiliar with Informix SP's. Thank's in Advance. Neil Sent via Deja.com http://www.deja.com/ Before you buy.
In article <8t6ctd$vpl$1@nnrp1.deja.com>,
neilrbcl@my-deja.com wrote:
> Can anybody advise, from experience, on what the contents of a simple
> Informix Stored Procedure would look like to return the entire
> contents
> of an SQL Select statement to an ADO recordset in VB would look like.
As far as Informix is concerned, it doesn't matter if the
client is VB or not. Here's one I had in my archive:
CREATE PROCEDURE params()
RETURNING CHAR(15),
CHAR(15); DEFINE l_name char(15);
DEFINE f_name char(15);
foreach
select lname, fname
into l_name, f_name
from customer
return l_name, f_name with resume;
end foreach;
end procedure;
--
Tom Kliethermes 90% of people give the rest of us a bad name.
"Not answering this post implies that you believe everything I
have said."
Sent via Deja.com http://www.deja.com/
Before you buy.
In article <8t72eu$ich$1@nnrp1.deja.com>, thamus <thamus@my-deja.com> wrote: > In article <8t6ctd$vpl$1@nnrp1.deja.com>, > neilrbcl@my-deja.com wrote: > > Can anybody advise, from experience, on what the contents of a simple > > Informix Stored Procedure would look like to return the entire > > contents > > of an SQL Select statement to an ADO recordset in VB would look like. > > As far as Informix is concerned, it doesn't matter if the > client is VB or not. Here's one I had in my archive: > Many thanks for that. I dont suppose that you have had experience of return recordsets to ADO? Using the idea that you responded with worked fine for me, except that I now have a recordset with 11 fields all named (expression). Is there any way the Stored Procedure can assign alias's to the returned values? Thanks again. Neil. Sent via Deja.com http://www.deja.com/ Before you buy.