🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #21829

Oracle parameterized queries

#21829
From: Raman Mistry
Date: Mon, 27 Oct 1997 00:00
47 lines
1727 bytes
I am trying to do a paremeterised query

select column1 from table where column2 = :param

I have used the Datmodule to handle the queries and set the paramneter
variables etc
and code of the form

  ParameterRow pr = new ParameterRow();
  Column prcol = new Column();
...
...
    column1.setColumnName("PARAM");
    column1.setDataType(borland.jbcl.util.Variant.BIGDECIMAL);

querySecurity.setMetaDataUpdate(borland.jbcl.dataset.MetaDataUpdate.NONE);

    querySecurity.setColumns(new Column[] {column1});
  prcol.setColumnName("PARAM");
  prcol.setDataType(borland.jbcl.util.Variant.BIGDECIMAL);
  pr.addColumn(prcol);
  pr.setBigDecimal("PARAM", bigdecimalvariable);

In the Datamodule class when I do a test Query I get a failure with the
message

'ORA-1008 not all variables bound'

Can someone confirm whether this is an oracle JDBC driver problem ( I am
using the beta type 4  driver)?
Or is there something more fundamental that I have missed out?

Thanks.
--
Regards ...
-----------------------------------------------------------------
Raman Mistry <raman@ubiquity.co.uk>

Ubiquity Software Corporation Limited
Imperial House, Imperial Way
Celtic Lakes,
Newport NP1 9UH

http://www.ubiquity.co.uk
Tel : +44 (0)1633 811806
Fax : +44 (0)1633 811807
Technical Details
Message-ID: <345471F5.9D2D9957@ubiquity.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1073da,c667f11d8a2d4528,start
X-Google-Attributes: gid1073da,public
From: Raman Mistry <raman@ubiquity.co.uk>
Subject: Oracle parameterized queries
Date: 1997/10/27
Message-ID: <345471F5.9D2D9957@ubiquity.co.uk>
X-Deja-AN: 285297648
Organization: Ubiquity Software Corporation
Reply-To: raman@ubiquity.co.uk
Newsgroups: borland.public.jbuilder.database