Stored Procedures
Stored Procedures
От:
fabrice <regnier.fabrice@free.fr>
Дата:
Hi:) I'm looking for a piece of code that could show me how to call a stored procedure with parameters from Access95 (VB). It seems nothing exists in the deep www :( f.
Re: Stored Procedures
От:
Jeff Eckermann <jeff_eckermann@yahoo.com>
Дата:
--- fabrice wrote: > Hi:) > > I'm looking for a piece of code that could show me > how to call a stored > procedure with parameters from Access95 (VB). > > It seems nothing exists in the deep www :( > I assume you mean, with parameters known only at runtime... You will need to do a passthrough query, and construct the query on the fly. (searches through vague memories ...) Using DAO: create a querydef, set the "connect" property (look in the help file to get the construction), set the "sql" property to be your dynamically constructed query string. If you are not returning any records (i.e. doing inserts, updates or whatever), then set the "returnsrecords" property to false. I haven't done this for a while, so my memory is a little vague, but that should give you an idea. __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com
Re: Stored Procedures
От:
fabrice <regnier.fabrice@free.fr>
Дата:
Hi and thanx :) Here is what i've done : Dim dbs As DATABASE, qdf As QueryDef Set dbs = CurrentDb dbs.Connect = "odbc;dsn=PostGreSQL;uid=fabrice;pwd=fabrice;database=db1;" dbs.Execute "select p4();", dbSQLPassThrough And it worked. p4() is a stored procedure wich returns an integer but, right now, i don't care about the result. Next step is to pick up the results from the stored procedure. f. Jeff Eckermann a écrit: > --- fabrice wrote: > >>Hi:) >> >>I'm looking for a piece of code that could show me >>how to call a stored >>procedure with parameters from Access95 (VB). >> >>It seems nothing exists in the deep www :( >> > > > I assume you mean, with parameters known only at > runtime... > > You will need to do a passthrough query, and construct > the query on the fly. (searches through vague > memories ...) Using DAO: create a querydef, set the > "connect" property (look in the help file to get the > construction), set the "sql" property to be your > dynamically constructed query string. If you are not > returning any records (i.e. doing inserts, updates or > whatever), then set the "returnsrecords" property to > false. > > I haven't done this for a while, so my memory is a > little vague, but that should give you an idea. > > __________________________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo > http://search.yahoo.com > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html >