Results 1 to 5 of 5

Thread: SQL Server & DataSets ?? Key Column Info ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97

    SQL Server & DataSets ?? Key Column Info ?

    i've just started developing using sql server & vb.net

    and am slowly learning about ado rather than dao but my question is this

    im using vb.net & i have some code using a OleDbDataAdapter, OleDbConnection, OleDbCommand and a DataSet

    but when i try n update records on the database i keep getting the error

    Dynamic generation of SQL cannot be done . . . .

    because no key column information was selected ???

    whats key column information its really starting to do my head in

  2. #2
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    How are you updating them ??

    With recordset, updatestatement ??
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97
    using the myDataAdapter.update command

    and passing in the dataset

  4. #4
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313
    Does your table have a primary key?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97
    Primary Key

    im using the one column as a Unique ID but its not set as the primary key

    ill give it a goe see if it works []

Posting Permissions

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



Click Here to Expand Forum to Full Width