Table not unlock after create index statement

B

berso

This is kinda wierd, i'm using an informix DB, i create an index using
a
Statement.executeUpdate("CREATE INDEX..."), after that, i'm try to
update the table and give me this error:

update error :java.sql.SQLException: Table (infocorp.it_r38y39) has
been
dropped, altered or renamed.

if i remove the CREATE INDEX the it runs fine, but way to slow, so i
asuming that the table is not unlocking....any ideas?

Thanks
 
S

Simon Brooke

in message <[email protected]>, berso
('(e-mail address removed)') wrote:

This is an Informix question, not a Java question, you'd be better asking
on an Informix group.
This is kinda wierd, i'm using an informix DB, i create an index using
a
Statement.executeUpdate("CREATE INDEX..."), after that, i'm try to
update the table and give me this error:

update error :java.sql.SQLException: Table (infocorp.it_r38y39) has
been
dropped, altered or renamed.

I suggest you may need a commit after the create index. However, having
said that, should you be creating an index? Is this installer code, or is
it application layer code, in which case why is the application making
structural changes to the database?

My general advice is to get database /structure/ right at install time,
normally by running a SQL script, and subsequently leave it alone as far
as possible.
 
B

berso

Yes i think is more an informix q', what i'm doing is generating a
table that have to be refreshed every month, and the fastest way to
doit as far as i now is to drop the table , then
create the table with out indexes, insert the data, and then create the
indexes....but then i have to do a bunch of updates, and then is when
the problem starts, anyway i think it still related to java in some way
because, i wonder why the statement class returns the control to the
program if the index is not yet created, i'm agree with the commit, but
the DB is not transactional so i can't use it, i may just create the
table with indexes, or even just delete the data even if it takes a bit
longer....Thanks anyway.


Simon Brooke ha escrito:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top