ODBC SQL Server Driver Error: Invalid object name

  • Hi,

    I get an error when I try to run a VB6 application. What happens is the application tries to access a SQL Server table and inspite of the correct login and user permissions on the database, I get this error:

    2147217865 : [Microsoft] [ODBC SQL Server Driver][SQL Server] Invalid object name 'KKK_CURR_PERD_RATE'

    The surprising thing is the same application works okay when connected to another server which has the same level of login and user permission settings in SQL Server.

    Does someone know the cause of this error ?

    Thanks,

    Paul

  • does the object exist on both servers? Is the owner of the object the same on both servers?

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

  • george sibbald (5/15/2012)


    does the object exist on both servers? Is the owner of the object the same on both servers?

    As far as I know, the login name on both the servers is the same which is 'tlfuser'. Could it due to the differenence in operating systems or the way security is handled on SQL 2008 and SQL 2005 ?.

    It works okay on SQL 2005 but not on SQL 2008.

  • no relevant differences in security between SQL2005 and SLQ2008 in this context.

    the error says it cannot find that object, so either it does not exist, you are not connected to the database you think you are (check default database for the login), or it is not owned by dbo.

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

  • pwalter83 (5/15/2012)


    george sibbald (5/15/2012)


    does the object exist on both servers? Is the owner of the object the same on both servers?

    As far as I know, the login name on both the servers is the same which is 'tlfuser'. Could it due to the differenence in operating systems or the way security is handled on SQL 2008 and SQL 2005 ?.

    It works okay on SQL 2005 but not on SQL 2008.

    no, i think the error about invalid object name is the key. it's clearly connecting to some database...but is it the right database?

    george sibbald's thoughts are the same as mine.

    1. make sure the connection string is the "right" database....if the user conencts to master, for example, isntead of the database, you'd get that kind of error.

    if the table is in an odd schema, like tlfuser.Tablename instead of dbo.Tablename, you would get the smae object not found error.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hey @pwalter83 I am facing a similar issue. All the permissions and tables look the same for me on both servers as well. Can I know how you solved it. That would be really helpful.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply