Table not unlock after create index statement

Discussion in 'Java' started by berso, Oct 4, 2006.

  1. berso

    berso Guest

    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
     
    berso, Oct 4, 2006
    #1
    1. Advertising

  2. berso

    Simon Brooke Guest

    in message <>, berso
    ('') 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.

    --
    (Simon Brooke) http://www.jasmine.org.uk/~simon/

    Tony Blair's epitaph, #1: Tony Blair lies here.
    Tony Blair's epitaph, #2: Trust me.
     
    Simon Brooke, Oct 5, 2006
    #2
    1. Advertising

  3. berso

    berso Guest

    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:

    > in message <>, berso
    > ('') 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.
    >
    > --
    > (Simon Brooke) http://www.jasmine.org.uk/~simon/
    >
    > Tony Blair's epitaph, #1: Tony Blair lies here.
    > Tony Blair's epitaph, #2: Trust me.
     
    berso, Oct 5, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cameron Frasnelly

    Unlock / Reset User Account in AD

    Cameron Frasnelly, Jul 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    556
    Cameron Frasnelly
    Jul 3, 2003
  2. Cameron Frasnelly

    Unlock AD User Account

    Cameron Frasnelly, Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    608
    Cameron Frasnelly
    Jul 8, 2003
  3. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    355
    Tomasz Chmielewski
    Mar 4, 2008
  4. Stefan Mueller
    Replies:
    7
    Views:
    212
    Thomas 'PointedEars' Lahn
    Nov 28, 2005
  5. Replies:
    0
    Views:
    156
Loading...

Share This Page