SelectCommand that does not return any key column information

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shenc

    #1

    SelectCommand that does not return any key column information

    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
    GetUpdateComman d or GetDeleteComman d:

    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

    #2
    Re: SelectCommand that does not return any key column information

    Hi,

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

    --
    Val Mazur
    Microsoft MVP


    "Shenc" <shenc@hotmail. com> wrote in message
    news:OdLN1K3XDH A.2392@TK2MSFTN GP10.phx.gbl...[color=blue]
    > 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
    > GetUpdateComman d or GetDeleteComman d:
    >
    > 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[/color]
    it's[color=blue]
    > the problem of synonym that when select will not return any key column[/color]
    info.[color=blue]
    > help..
    >
    > ShenC
    >
    >[/color]


    Comment

    • Shenc

      #3
      Re: SelectCommand that does not return any key column information

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

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

      ShenC

      --

      "Val Mazur" <group51a@hotma il.com> wrote in message
      news:#I7BDb6XDH A.652@tk2msftng p13.phx.gbl...[color=blue]
      > Hi,
      >
      > What kind of database are you using? What is your code, which generates[/color]
      that[color=blue]
      > error?
      >
      > --
      > Val Mazur
      > Microsoft MVP
      >
      >
      > "Shenc" <shenc@hotmail. com> wrote in message
      > news:OdLN1K3XDH A.2392@TK2MSFTN GP10.phx.gbl...[color=green]
      > > 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
      > > GetUpdateComman d or GetDeleteComman d:
      > >
      > > 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[/color][/color]
      am[color=blue][color=green]
      > > confused. I was wondering if any body has any suggestion on this. Maybe[/color]
      > it's[color=green]
      > > the problem of synonym that when select will not return any key column[/color]
      > info.[color=green]
      > > help..
      > >
      > > ShenC
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...