Re: Parameterized ODBC queries with Oracle

From: david R. Tibbot <dtibbot_at_seanet.com>
Date: 1997/02/18
Message-ID: <01bc1df7$176cb8a0$05810ccf_at_tek_mgr>#1/1


Having same problem with "insert into...values(?,?) cutting the query out and using SQL+ it works fine. no errors on SQLPrepare, SQLBindParameter, but SQLExec generates a constraint violation error, parrent key not found.

using VB4.0 with Oracle 7.2 and Oracle 1.11.0105 ODBC drivers. no solutions only more problems
Dave T.

Brian Sondergaard <bsonderg_at_msn.com> wrote in article <01bc1d24$d1ec8c60$0f3f2399_at_default>...
> I'm having a time trying to get a parameterized query to work with
 Oracle.
> The same code works perfectly against MS Access.
>
> I have a CRecordset derived class that represents a simple query over a
> single table in an Oracle DB, and I'm trying to use a filter that's
> parameterized on a string (char 20) field. No matter what I try, no
 records
> are found. When I change the field on which I'm filtering to a long
> (number) field, things work as you'd expected.
>
> Looking at the ODBC trace, the query looks OK, and the input parm is the
> right value. If I copy the query from the trace, substitute the parm
 value
> and execute in MS Query, the appropriate row is selected.
>
> I'm using VC++ 4.2/MFC, NT 4.0, Oracle 7.1, and have tried various ODBC
> Drivers.
>
> Thanks in advance!
>
> Stumped in Atlanta,
> Brian
>
>
Received on Tue Feb 18 1997 - 00:00:00 CET

Original text of this message