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. Advertising

  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. Advertising

  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
    > 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. 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. clercmedia
    Replies:
    2
    Views:
    32,277
    clercmedia
    Dec 9, 2005
  2. John Kotuby
    Replies:
    1
    Views:
    867
    John Kotuby
    Feb 24, 2007
  3. lerenard001
    Replies:
    0
    Views:
    421
    lerenard001
    Jul 7, 2008
  4. lerenard001
    Replies:
    0
    Views:
    472
    lerenard001
    Jul 9, 2008
  5. M P
    Replies:
    1
    Views:
    465
Loading...

Share This Page