Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Posts
    13

    Unanswered: Msg defention and removal

    What does the msg really want to say? Pressing yes seems to make things work and i havnt seen anything negative so far but a simplified version might make me understand why this msgbox...

    I startetd importing tables in csv extensions into access but i noticed that everytime i import large amount of tables, i get the msgbox "database was unable to append all the data to the table etc etc..." (i have attached a picture of the msg box)

    I need to ask what sort of code can make this box dissapear but automatically the yes option gets selected. Any ideas? Must be a module?
    Attached Thumbnails Attached Thumbnails text.JPG  
    Last edited by spleewars; 02-25-09 at 12:48.

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    It's telling you (I think) that one of the records you're trying to import has a PK identically equal to another record already in the table. Check to make sure you're not attempting (deliberatlely or otherwise) to duplicate records. It might even be that you're importing the header of the table and it's already been imported once before, but I don't know enough about what you're doing to be able to say for sure.
    Me.Geek = True

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    It can also be a record in the data that cannot be added to the table because of referential integrity issues.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Not sure offhand if the error you showed is due to this kind of situation (or if you would get a different kind of error - I can't recall) but another possibility is that you have a bad/blank value trying to be imported into required/different data type field. Maybe I'm thinking of another similiar error were I couldn't import all the records (or some were lost) due to a bad date field, wrong value type or a blank field importing to a required field. I think that shows a different error though than the one you're getting and Nick or StarTrekker are probably correct for the error you showed.
    Last edited by pkstormy; 02-26-09 at 03:38.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Jan 2009
    Posts
    13
    Stormy and trek, you both helped me in the past with a lot of big issues and i guess im in a deep shit this time... i'll try to explain the best i can;

    Due insufficient knowledge of database, i was able to build a database for my family bussiness and i figured out a lot of stuff. Untill i ended coding, everything seemed to be fine but now as im putting it on trial, big problems occur...

    I dont undnerstand a dime about networking so i had to work in a very odd way.

    I'v made 3 databases; 2 sales and 1 administrator. Both of the sales databases consist of the same tables, 2 different computers (computer 1 and 2) and the administrator has the tables of both the 2 sales databases (obviously the tables are of the sales got different names for each databases). I have decided that at the end of the day, both sales database export the tables in .csv extension and transfer them into a folder in the server computer, where is the administrator database, using sftp. This if so the director would be able to check the sales of the day etc... but i have noticed that when the director logs in the administrator database and press the import from the csv files, it displays the box i posted earlier. Its ok, the files gets imported normally but what is happening is quite strange because, if the director is modifying a record, an order for example that was inputted from the sales database 1 early in the morning, when he is saving the record and export it back as a new csv and transfer the csv back to sales database, in computer 1, when the user imports the csv file edited by the director, the order is not updated! This is an example, because there are a lot of other tables that aren’t getting updated…

    From this tread I heard about the relations and I bet the trouble lies there… hope I was able to explain but I did my best to do so. Please let me know how if you don’t understand any part, I’ll try to better explain. But now, please help!!

    (i have uploaded a simple diagram)
    Attached Thumbnails Attached Thumbnails PIC.JPG  
    Last edited by spleewars; 02-26-09 at 12:52.

  6. #6
    Join Date
    Nov 2007
    Posts
    93
    well as far as i understood

    database1 is transfering the file on the server .. and the admin at the other end opens in his database which has admin rights and updates it..

    and new csv is created .. it aint wrong wit the logic ... ? and the database1 at the other end arent updated rite ???

    you have 2 options here...

    if the tables are the same for all 3 databases then you have the option to link them using link tables from one database to the other two databases

    but by using this option you allow all the users to edit/chnage/delete tables.. which isnt advisable

    next option for you would be ...

    try to link the csv sheets .. like with an import operation that considers the last sheet generated for the day
    or else try to drop the table such as delete * from xyz table .. contents gets deleted and now try to update the csv as append query

    and if you are jst intrested to update the new then try to make a delete duplicates qyert upon importing

    hope this helps you out
    Last edited by sam_01; 02-26-09 at 16:46.

  7. #7
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    What a weird setup.

    Normally, you'd just have the one data file (MDB) sitting on the server and all the other machines just use that data file via linked tables. One ORDER table. There is no need for importing/exporting then.

    Work out the networking rather than try to bypass it! Don't give up on trying to understand it, because once you do, you will never look back... or you will look back and wonder why you didn't do that in the first place!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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