Results 1 to 6 of 6
  1. #1
    Join Date
    May 2007
    Posts
    139

    Unanswered: I have a TABLE but only appear entries/records with select can

    I have a TABLE but only appear entries/records with select can...(java se6/access 2003) when use insert although shows success data added database[java program shows this] do not change (DSN use), well how I change privilege on a db table to appear added data (and not get false sense of) ???

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    insert is for inserting data.


    select is for reading data.


    insert, then select. These are two separate steps.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    May 2007
    Posts
    139
    yes but table had 3 records where I SELECT and view in a java output program success ...when then I make INSERT and then SELECT again the new record do NOT appear although java output program appeared success insered(my indicator-success INSERT execution) , well why this ? how fix ? is it with privileges?

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I'm not much on java but I recall for php, I had to do an insert statement, close the insert code, and then run the select statement. If you're doing these in 1 select statement, you may want to separate them and do an insert first, then a select (which I think your doing anyway - I just wasn't sure).

    It's also very likely that you do not have permissions to insert (ie. on the SQL Server/Oracle/MySQL db - since it sounds like you're using ODBC to connect to a backend server). You may only have permissions to return records. Permissions might be were I would start.

    Otherwise, I'm "GUESSING" that somehow the recordset is not getting refreshed with your insert statement. You may want to try inserting the same values manually against the table (not through code) to see if you can insert values. If it can't update manually, that leads to another problem with your structure (ie. possibly a required field) or permissions. Then run the code and open the table to see if the record exists. If it does, then perhaps look at your select statement. If it doesn't exist, it's typically something with violating some rule/permissions (Usually though you get an error message somewhere along the lines).
    Last edited by pkstormy; 11-22-09 at 03:47.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    May 2007
    Posts
    139

    I think privileges are ok see attachment (access 2003),

    I think privileges are ok see attachment (access 2003), and whenopen manually the TABLE in Access and add data they stay persistent, well ? Viewing DSN or db file is any difference ?
    Attached Thumbnails Attached Thumbnails privileges-access2003.jpg  

  6. #6
    Join Date
    May 2007
    Posts
    139
    again java appears initial results only and not record added ? also what is ODBC8.mdb kind of files created alone?

Posting Permissions

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