Results 1 to 3 of 3

Thread: insufficient key column information

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    12

    Unhappy insufficient key column information

    I'm trying to update data using the ado dataenvironement with joined tables, and primary keys.

    example:
    mysql = "Select * FROM Inventory INNER JOIN ON "

    .....more code ......
    de.command(scommand1) = mysql
    then I select the cursor types etc.

    with rscommand1
    if len(text1(part)<> 0 then !Partnumber = text1(part)
    .... more code .....
    .update 'this is where I get the error...(insufficient key column
    information.....)

    end with
    'the Partnumber is the primary key.
    can anyone help? Thanks

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Hi kconvert,
    found this article in the MSDN, maybe you find your problem after reading it:

    BUG: Problem Updating ADO Hierarchical Recordset When Join Tables Share Same Column Name
    ID: Q246905


    --------------------------------------------------------------------------------
    The information in this article applies to:

    Microsoft Data Access Components versions 2.1, 2.1 (GA), 2.1 SP1, 2.1 SP2, 2.5, 2.6

    --------------------------------------------------------------------------------


    SYMPTOMS
    When updating an ActiveX Data Objects (ADO) recordset, an error occurs if the recordset, based on a SHAPE command, joins two tables where the primary key of one table has the same name as a column name of the other table. The following error appears:

    Run-time error '-2147467259 (80004005)':

    Insufficient key column information for updating or refreshing.
    The preceding error also occurs when connecting to Oracle through Microsoft ODBC for Oracle.



    STATUS
    Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


    -= a peet post =-

  3. #3
    Member
    Join Date
    Mar 2001
    Posts
    38

    Insufficient key info

    Check your SQL statement or better still you can post the complete query, so we can take a closer look on what's causing the problem.
    Your SQL post:
    mysql = "Select * FROM Inventory INNER JOIN ON "
    Suggestion:
    mysql = "Select * FROM Inventory INNER JOIN OtherTableName ON Inventory.whatever = OtherTableName.whatever"

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