Generated UPDATE statement. could not determine which columns uniquely identify the rows for "Custom

Discussion in 'ASP .Net' started by bazzer, Apr 11, 2006.

  1. bazzer

    bazzer Guest

    i am having trouble updating a datset because i get the follwing error
    in the Data Adapter configuration Wizard:

    Generated UPDATE statement. could not determine which columns uniquely
    identify the rows for "Customers"

    'Customers' is the only table from the database that im using for this
    query, so it cant be anything to do with a problem of having multiple
    tables. and the primary key is set. so i dont understand what the
    problem is.

    im using asp.net 2003, a microsoft access database, and an
    OdbcDataAdapter.

    can anyone help?
    bazzer, Apr 11, 2006
    #1
    1. Advertising

  2. bazzer

    Jeff Dillon Guest

    It sounds like the primary key is NOT set, or has duplicate values

    Jeff
    "bazzer" <> wrote in message
    news:...
    >i am having trouble updating a datset because i get the follwing error
    > in the Data Adapter configuration Wizard:
    >
    > Generated UPDATE statement. could not determine which columns uniquely
    > identify the rows for "Customers"
    >
    > 'Customers' is the only table from the database that im using for this
    > query, so it cant be anything to do with a problem of having multiple
    > tables. and the primary key is set. so i dont understand what the
    > problem is.
    >
    > im using asp.net 2003, a microsoft access database, and an
    > OdbcDataAdapter.
    >
    > can anyone help?
    >
    Jeff Dillon, Apr 11, 2006
    #2
    1. Advertising

  3. bazzer

    bazzer Guest

    ive tried linking to a database with only one table, that has 2 fields,
    'numbers', and 'names', set the primary key to numbers, and still it
    wont work. ive even tried using windows forms and still i get the same
    errors.
    bazzer, Apr 12, 2006
    #3
  4. bazzer

    Jeff Dillon Guest

    Did you check my suggestion?

    "bazzer" <> wrote in message
    news:...
    > ive tried linking to a database with only one table, that has 2 fields,
    > 'numbers', and 'names', set the primary key to numbers, and still it
    > wont work. ive even tried using windows forms and still i get the same
    > errors.
    >
    Jeff Dillon, Apr 12, 2006
    #4
  5. bazzer

    bazzer Guest

    your suggestion? checking if the primary key is set, and checking for
    duplicate values?

    primary key is definetly set. and its set to Autonumber. By duplicate
    values do you mean duplicate fields or primary keys. but as i said, ive
    tried linking to a database with only one table, that has only 2
    fields, 'numbers', and 'names', set the primary key to numbers, and
    still it
    wont work even with the most basic table. ive even tried using windows
    forms and still i get the same errors. im about ready to give up really
    cause no one seems to have a clue whats wrong. myself included. i can
    only assume its something to do with the connection to the database
    maybe. thanks for the help though. if u think of anything else let me
    know.
    bazzer, Apr 12, 2006
    #5
  6. bazzer

    Jeff Dillon Guest

    Weird. Perhaps create a brand new database and try there? Perhaps it's
    corrupted?

    Jeff

    "bazzer" <> wrote in message
    news:...
    > your suggestion? checking if the primary key is set, and checking for
    > duplicate values?
    >
    > primary key is definetly set. and its set to Autonumber. By duplicate
    > values do you mean duplicate fields or primary keys. but as i said, ive
    > tried linking to a database with only one table, that has only 2
    > fields, 'numbers', and 'names', set the primary key to numbers, and
    > still it
    > wont work even with the most basic table. ive even tried using windows
    > forms and still i get the same errors. im about ready to give up really
    > cause no one seems to have a clue whats wrong. myself included. i can
    > only assume its something to do with the connection to the database
    > maybe. thanks for the help though. if u think of anything else let me
    > know.
    >
    Jeff Dillon, Apr 12, 2006
    #6
  7. bazzer

    bazzer Guest

    tried that too a few times im afraid.
    bazzer, Apr 12, 2006
    #7
  8. bazzer

    Jeff Dillon Guest

    I did see this from a Google search

    If I switch to OleDbConnection instead of OdbcConnection, everything's ok.

    "Jeff Dillon" <> wrote in message
    news:...
    > Weird. Perhaps create a brand new database and try there? Perhaps it's
    > corrupted?
    >
    > Jeff
    >
    > "bazzer" <> wrote in message
    > news:...
    >> your suggestion? checking if the primary key is set, and checking for
    >> duplicate values?
    >>
    >> primary key is definetly set. and its set to Autonumber. By duplicate
    >> values do you mean duplicate fields or primary keys. but as i said, ive
    >> tried linking to a database with only one table, that has only 2
    >> fields, 'numbers', and 'names', set the primary key to numbers, and
    >> still it
    >> wont work even with the most basic table. ive even tried using windows
    >> forms and still i get the same errors. im about ready to give up really
    >> cause no one seems to have a clue whats wrong. myself included. i can
    >> only assume its something to do with the connection to the database
    >> maybe. thanks for the help though. if u think of anything else let me
    >> know.
    >>

    >
    >
    Jeff Dillon, Apr 12, 2006
    #8
  9. bazzer

    kruch

    Joined:
    Mar 23, 2007
    Messages:
    1
    Did you ever get this issue resolved. I am having the same problem and looking for a solution.
    kruch, Mar 23, 2007
    #9
    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. Replies:
    2
    Views:
    615
    Curt_C [MVP]
    Jul 27, 2004
  2. Alan Silver

    How do I uniquely identify a control?

    Alan Silver, Feb 24, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    455
    Alan Silver
    Feb 24, 2005
  3. helpful sql
    Replies:
    0
    Views:
    798
    helpful sql
    May 19, 2005
  4. bazzer
    Replies:
    0
    Views:
    534
    bazzer
    Apr 10, 2006
  5. Tim_Mac
    Replies:
    3
    Views:
    1,901
    Tim_Mac
    Sep 12, 2006
Loading...

Share This Page