none
how to insert into tables without conflicts?? RRS feed

  • Question

  •  

     

    Hello everyone,

    got a question, in my application I read a text file which contains more than 300 records

    I have 2 tables .. one for the records from this file, and one like a log
    which includes information on who processed the file, the name of the file and and the time ..

    I tried inserting in the 2 tables at the same time ..
    but in the log table I got record numbers as the first one ..
    which contains each record inserted in the first table .. the name , file name, person name are all the same ..

    when I tried to index the file name.. I got an error cannot insert duplicate key with unique index ..


    my question is:
    how am going to insert one record in the log table, while the first table has more than one because they are all from the same file

     

    I hope you can understand me

    Sunday, June 3, 2007 4:40 AM

All replies

  • Hi aisha,
        I am moving this thread from Visual Basic Express Edition forum to the .NET Framework Data Access and Storage forum, since the issue is related to ADO.net. There are more ADO.net experts in the .NET Framework Data Access and Storage forum.
    Thanks for your understanding!
    Thursday, June 7, 2007 1:46 AM