logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: parameter to db function: msg#00094

db.postgresql.odbc

Subject: Re: parameter to db function

--- Sheeraz fazal <ng@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxx>
> To: "Sheeraz fazal" <ng@xxxxxxxxxxxxxxxxxxx>;
> <pgsql-odbc@xxxxxxxxxxxxxx>
> Sent: Tuesday, April 13, 2004 7:43 AM
> Subject: Re: [ODBC] parameter to db function
>
>
> > --- Sheeraz fazal <ng@xxxxxxxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo