Invalid object name

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

    Invalid object name

    Hi Folks,

    Need a bit of help with a problem I'm having:

    ODBC Error Code = S0002 (Base table not found)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
    'UsersVsPages'.


    SQL = "delete from Pages Where Page_Key = 147"


    The above error message is returned when running a piece of code. The
    table "UsersVsPag es" that can't be found did exist but I dropped it
    when it became unnecessary. I also set up a diagram with cascading
    deletes etc. This is where I'm guessing the problem originates but
    having looked through the relationships of "Pages" I have been unable
    to find any reference to "UsersVsPag es".

    Can anyone point me in the right direction?


    Thanks

    Dave A.
  • Simon Hayes

    #2
    Re: Invalid object name


    "David Armstrong" <ukprototype@ya hoo.com> wrote in message
    news:307ccadf.0 407070835.79340 80f@posting.goo gle.com...[color=blue]
    > Hi Folks,
    >
    > Need a bit of help with a problem I'm having:
    >
    > ODBC Error Code = S0002 (Base table not found)
    > [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
    > 'UsersVsPages'.
    >
    >
    > SQL = "delete from Pages Where Page_Key = 147"
    >
    >
    > The above error message is returned when running a piece of code. The
    > table "UsersVsPag es" that can't be found did exist but I dropped it
    > when it became unnecessary. I also set up a diagram with cascading
    > deletes etc. This is where I'm guessing the problem originates but
    > having looked through the relationships of "Pages" I have been unable
    > to find any reference to "UsersVsPag es".
    >
    > Can anyone point me in the right direction?
    >
    >
    > Thanks
    >
    > Dave A.[/color]

    Another possibility might be a trigger which still references the old table.
    If that's not the case, you could use Profiler to watch the SQL sent to the
    server, to make sure it's really executing what you think it is.

    Simon


    Comment

    • David Armstrong

      #3
      Re: Invalid object name

      Thanks very much Simon, it was a trigger. Being new to MSSQL I wasn't
      aware of this feature. Again thanks for the help.

      Dave A.

      "Simon Hayes" <sql@hayes.ch > wrote in message news:<40ec33b7$ 1_3@news.bluewi n.ch>...[color=blue]
      > "David Armstrong" <ukprototype@ya hoo.com> wrote in message
      > news:307ccadf.0 407070835.79340 80f@posting.goo gle.com...[color=green]
      > > Hi Folks,
      > >
      > > Need a bit of help with a problem I'm having:
      > >
      > > ODBC Error Code = S0002 (Base table not found)
      > > [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
      > > 'UsersVsPages'.
      > >
      > >
      > > SQL = "delete from Pages Where Page_Key = 147"
      > >
      > >
      > > The above error message is returned when running a piece of code. The
      > > table "UsersVsPag es" that can't be found did exist but I dropped it
      > > when it became unnecessary. I also set up a diagram with cascading
      > > deletes etc. This is where I'm guessing the problem originates but
      > > having looked through the relationships of "Pages" I have been unable
      > > to find any reference to "UsersVsPag es".
      > >
      > > Can anyone point me in the right direction?
      > >
      > >
      > > Thanks
      > >
      > > Dave A.[/color]
      >
      > Another possibility might be a trigger which still references the old table.
      > If that's not the case, you could use Profiler to watch the SQL sent to the
      > server, to make sure it's really executing what you think it is.
      >
      > Simon[/color]

      Comment

      Working...