Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003

    Unanswered: Immediate retrieval from database.

    Hi All,
    I am using the sun.jdbc.odbc.JdbcOdbcDriver to connect the MS Access
    database with my java program.

    In one of my method, I used to do 2 process

    1. Inserted one row through the SQL- INSERT.
    2. Retrieve from the table by a SQL - SELECT , But the data is not found there .

    I tried in the order that .

    1. insert query
    2. after connection close
    3. reestablished connection
    4. then select ...... But still query doesn't return the inserted data.

    But when i give a Thread.sleep(5000); in between the insert and select , I got the valid ResultSet ...

    What will be the problem ?
    Is there any other good way to solve this ?
    Please help .


  2. #2
    Join Date
    Dec 2003
    Yes, Selecting the same data that inserted in the first statement .

  3. #3
    Join Date
    Nov 2003
    Can you see the newly created records in the Access database itself (rather then through the ODBC connection)?

    If the records are not being created in Access then try checking your insert SQL statement isn't causing a conflict with any referential integrity in access. You might not be getting any messages back from the ODBC driver (or you may not be capturing the errors).

    Try inserting the record direclty in Access and see if you get an error message.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts