SelectCommand that does not return any key column information

Discussion in 'ASP .Net' started by Shenc, Aug 10, 2003.

  1. Shenc

    Shenc Guest

    I am using the CommandBuilder to auto-build the insert/update/delete
    commands. My select command is very simple like "Select * From MyTable".
    where MyTable is a synonym created for a real table Owner.MyTable in an
    Oracle DB. But I got an runtime error when it comes to any of the
    GetUpdateCommand or GetDeleteCommand:

    Dynamic SQL generation for the UpdateCommand is not supported against a
    SelectCommand that does not return any key column information

    I have checked Owner.MyTable, it does have a primary key defined. So I am
    confused. I was wondering if any body has any suggestion on this. Maybe it's
    the problem of synonym that when select will not return any key column info.
    help..

    ShenC
     
    Shenc, Aug 10, 2003
    #1
    1. Advertisements

  2. Shenc

    Val Mazur Guest

    Hi,

    What kind of database are you using? What is your code, which generates that
    error?

    --
    Val Mazur
    Microsoft MVP


    "Shenc" <> wrote in message
    news:...
    > I am using the CommandBuilder to auto-build the insert/update/delete
    > commands. My select command is very simple like "Select * From MyTable".
    > where MyTable is a synonym created for a real table Owner.MyTable in an
    > Oracle DB. But I got an runtime error when it comes to any of the
    > GetUpdateCommand or GetDeleteCommand:
    >
    > Dynamic SQL generation for the UpdateCommand is not supported against a
    > SelectCommand that does not return any key column information
    >
    > I have checked Owner.MyTable, it does have a primary key defined. So I am
    > confused. I was wondering if any body has any suggestion on this. Maybe

    it's
    > the problem of synonym that when select will not return any key column

    info.
    > help..
    >
    > ShenC
    >
    >
     
    Val Mazur, Aug 11, 2003
    #2
    1. Advertisements

  3. Shenc

    Shenc Guest

    Found the problem. Here is the link in case any one interested.

    http://support.microsoft.com/?id=329794

    ShenC

    --

    "Val Mazur" <> wrote in message
    news:#...
    > Hi,
    >
    > What kind of database are you using? What is your code, which generates

    that
    > error?
    >
    > --
    > Val Mazur
    > Microsoft MVP
    >
    >
    > "Shenc" <> wrote in message
    > news:...
    > > I am using the CommandBuilder to auto-build the insert/update/delete
    > > commands. My select command is very simple like "Select * From MyTable".
    > > where MyTable is a synonym created for a real table Owner.MyTable in an
    > > Oracle DB. But I got an runtime error when it comes to any of the
    > > GetUpdateCommand or GetDeleteCommand:
    > >
    > > Dynamic SQL generation for the UpdateCommand is not supported against a
    > > SelectCommand that does not return any key column information
    > >
    > > I have checked Owner.MyTable, it does have a primary key defined. So I

    am
    > > confused. I was wondering if any body has any suggestion on this. Maybe

    > it's
    > > the problem of synonym that when select will not return any key column

    > info.
    > > help..
    > >
    > > ShenC
    > >
    > >

    >
    >
     
    Shenc, Aug 14, 2003
    #3
  4. Shenc

    ivanxie

    Joined:
    Dec 21, 2012
    Messages:
    1
    Likes Received:
    0
    > I am using the CommandBuilder to auto-build the insert/update/delete
    > > commands. My select command is very simple like "Select * From MyTable".
    > > where MyTable is a synonym created for a real table Owner.MyTable in an
    > > Oracle DB. But I got an runtime error when it comes to any of the
    > > GetUpdateCommand or GetDeleteCommand:
    > >
    > > Dynamic SQL generation for the UpdateCommand is not supported against a
    > > SelectCommand that does not return any key column information
    > >
    > > I have checked Owner.MyTable, it does have a primary key defined. So I
    am
    > > confused. I was wondering if any body has any suggestion on this. Maybe







    the solution is : your table must have primary key.
     
    ivanxie, Dec 21, 2012
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. clercmedia
    Replies:
    2
    Views:
    33,475
    clercmedia
    Dec 9, 2005
  2. Keithb
    Replies:
    2
    Views:
    1,452
  3. Greenhorn
    Replies:
    15
    Views:
    1,243
    Keith Thompson
    Mar 6, 2005
  4. lerenard001
    Replies:
    0
    Views:
    675
    lerenard001
    Jul 7, 2008
  5. lerenard001
    Replies:
    0
    Views:
    743
    lerenard001
    Jul 9, 2008
  6. albert kao
    Replies:
    7
    Views:
    4,439
  7. Replies:
    1
    Views:
    374
  8. M P
    Replies:
    1
    Views:
    970
Loading...