comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Gnade/ODBC example - please help
Date: Fri, 1 Aug 2008 15:10:47 +0200
Date: 2008-08-01T15:10:47+02:00	[thread overview]
Message-ID: <1xn2cgs2saua1$.bl5lc24hwbq1.dlg@40tude.net> (raw)
In-Reply-To: 4962abea-7622-45b3-a121-49286c636421@2g2000hsn.googlegroups.com

On Fri, 1 Aug 2008 05:18:38 -0700 (PDT), azdakiel@gmail.com wrote:

> And now my problem: This example shows how to pass integer parameter
> to the query and get string and float from the database.
> I trying to pass to the query string and the boolean (...WHERE NAME =
> name AND IsVisible = visible...) and I can't. I have no idea how to
> rewrite this example.

Bind them as parameters. The relevant call is SQLBindParameter. In the
statement the parameters to bound are specified by the placeholder '?'.
Simple values like Boolean could also be specified as literals directly in
the statement. Unless you keep the prepared statement for several
executions with the parameters varying.

I also would recommend you to read about ODBC in order to understand how it
works + about the implementation of ODBC provided by the DBMS you are
working with.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2008-08-01 13:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01 12:18 Gnade/ODBC example - please help azdakiel
2008-08-01 13:10 ` Dmitry A. Kazakov [this message]
2008-08-01 13:37 ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox