pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
parameter to db function 3+ messages / 2 participants [nested] [flat]
* parameter to db function @ 2004-04-12 22:14 Sheeraz fazal <ng@iwerx.vertextek.com> 2004-04-13 13:43 ` Re: parameter to db function Jeff Eckermann <jeff_eckermann@yahoo.com> 0 siblings, 1 reply; 3+ messages in thread From: Sheeraz fazal @ 2004-04-12 22:14 UTC (permalink / raw) To: pgsql-odbc Hi, Is it allowed to pass parameters to a db function through ODBC? Thanks. ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: parameter to db function 2004-04-12 22:14 parameter to db function Sheeraz fazal <ng@iwerx.vertextek.com> @ 2004-04-13 13:43 ` Jeff Eckermann <jeff_eckermann@yahoo.com> 0 siblings, 0 replies; 3+ messages in thread From: Jeff Eckermann @ 2004-04-13 13:43 UTC (permalink / raw) To: Sheeraz fazal <ng@iwerx.vertextek.com>; pgsql-odbc --- Sheeraz fazal <ng@iwerx.vertextek.com> wrote: > Hi, > > Is it allowed to pass parameters to a db function > through ODBC? Yes. Just capture the values in your application, then construct a query string and send it to the server. > > Thanks. > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: parameter to db function @ 2004-04-13 19:06 Jeff Eckermann <jeff_eckermann@yahoo.com> 0 siblings, 0 replies; 3+ messages in thread From: Jeff Eckermann @ 2004-04-13 19:06 UTC (permalink / raw) To: Sheeraz fazal <ng@iwerx.vertextek.com>; +Cc: pgsql-odbc --- Sheeraz fazal <ng@iwerx.vertextek.com> wrote: > Thanks Jeff. > Can you tell me if i have to pass parameters to a db > function let's say it's > name is > > get_square(integer) > > It returns square of a number. What will be the > syntax of the ODBC call to > invoke this function, and > how you will specify the place holder for the > returned value. I don't do ODBC calls ;-) Exactly how you handle this depends on your choice of language and data access library. In general: you want to send a SQL string "SELECT get_square(integer_value)", where "integer_value" is determined at run time. What you get back will be a result set with one row and one column. If you want to refer to the column by name, you can specify a name by adding the alias "AS my_column_name" to the SQL string. The rest you can get from the documentation for your environment, particulary about how SQL queries and result sets are handled. > > Thanks. > > ----- Original Message ----- > From: "Jeff Eckermann" <jeff_eckermann@yahoo.com> > To: "Sheeraz fazal" <ng@iwerx.vertextek.com>; > <pgsql-odbc@postgresql.org> > Sent: Tuesday, April 13, 2004 7:43 AM > Subject: Re: [ODBC] parameter to db function > > > > --- Sheeraz fazal <ng@iwerx.vertextek.com> wrote: > > > Hi, > > > > > > Is it allowed to pass parameters to a db > function > > > through ODBC? > > > > Yes. Just capture the values in your application, > > then construct a query string and send it to the > > server. > > > > > > > > Thanks. > > > > > > > > > > > > ---------------------------(end of > > > broadcast)--------------------------- > > > TIP 7: don't forget to increase your free space > map > > settings > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Small Business $15K Web Design Giveaway > > http://promotions.yahoo.com/design_giveaway/ > > > > ---------------------------(end of > broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > > http://www.postgresql.org/docs/faqs/FAQ.html > > > > > __________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-04-13 19:06 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2004-04-12 22:14 parameter to db function Sheeraz fazal <ng@iwerx.vertextek.com> 2004-04-13 13:43 ` Jeff Eckermann <jeff_eckermann@yahoo.com> 2004-04-13 19:06 Re: parameter to db function Jeff Eckermann <jeff_eckermann@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox