Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT ACCESS
Prepare Statement throwing ArrayIndexOutOfBoundsException
Sam Otto
2008-08-24 16:10:01
I am trying to run the following query using a PrepareStatement:

SELECT t1.Name FROM table1 t1, table2 t2 WHERE t1.Id = t2.Id AND t2.t2name = ?

The result is the following:

java.lang.ArrayIndexOutOfBoundsException: -2147483546
at com.hxtt.sql.de.a(Unknown Source)
at com.hxtt.sql.de.a(Unknown Source)
at com.hxtt.sql.de.a(Unknown Source)
at com.hxtt.sql.de.a(Unknown Source)
at com.hxtt.sql.de.a(Unknown Source)
at com.hxtt.sql.bm.a(Unknown Source)
at com.hxtt.sql.bm.a(Unknown Source)
at com.hxtt.sql.ag.a(Unknown Source)
at com.hxtt.sql.dg.executeQuery(Unknown Source)
at Example1.executeQuery(Example1.java:36)
at Example1.main(Example1.java:11)

The database script is:

create table "table1"(
"Id" INTEGER,
"Name" VARCHAR(128)
);

create index "idx_table1_id" on "table1"("Id");

create table "table2"(
"id" INTEGER,
"t2name" VARCHAR(64)
);

create unique index "idx_table2" on "table2"("id","t2name");

Any ideas what the problem is?
Re:Prepare Statement throwing ArrayIndexOutOfBoundsException
HXTT Support
2008-08-24 21:43:45
create unique index "idx_table2" on "table2"("id","t2name");
should fail.
Passed test with the latest package:
create table "table1"("Id" INTEGER,"Name" VARCHAR(128));
create index "idx_table1_id" on "table1"("Id");
create table "table2"("id" INTEGER,"t2name" VARCHAR(64));
create unique index "idx_table2","idx_name" on "table2"("id","t2name");
insert into table1 values (1,'a');
insert into table1 values (2,'abc');
insert into table1 values (3,'abc');
insert into table2 values (3,'abc');
insert into table2 values (3,'a');
insert into table2 values (1,'a');

*SELECT t1.Name FROM table1 t1, table2 t2 WHERE t1.Id = t2.Id AND t2.t2name = ?
SELECT t1.Name FROM table1 t1, table2 t2 WHERE t1.Id = t2.Id AND t2.t2name = 'a'

Re:Re:Prepare Statement throwing ArrayIndexOutOfBoundsException
HXTT Support
2008-08-25 04:42:41
Thanks. Recurred with create unique index "idx_table2" on "table2"(("id","t2name"));
You can download a fixed package AFTER 8 hours.
Re:Re:Re:Prepare Statement throwing ArrayIndexOutOfBoundsException
Sam Otto
2008-08-26 09:07:21
Is this now fixed? How do we get the fixed version if we already purchased the product?
Re:Re:Re:Re:Prepare Statement throwing ArrayIndexOutOfBoundsException
HXTT Support
2008-08-26 16:33:47
Fixed. You can download it through here.

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap