none
ODBC Drivers for Microsoft SQL Server Default Schema issue.

    Question

  • ODBC Drivers for Microsoft SQL Server issue for Default Schema.
    If Default schema is other then the 'dbo' then how can we define using DSN (ODBC Drivers).
    We tried following things
    1. Provided 'DefaultSchema' string value in ODBC DSN registry
    2. Provided 'DefaultSchema' in ODBCConnection connection string
    3. Assign Default Schema to user through which we are accessing DSN. This works for SqlConnection class but not for ODBCConnection class.
    It gives following error
    ODBCMappingViewERROR [42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name '<Table Name>'.
    We want a generalize solution that can work for all ODBC drivers for Table Schema.
    We only want to use ODBC DSN for accessing the data.
     
    Friday, August 16, 2013 1:31 PM

Answers

  • Hello,

    Welcome toMSDN Support Forum.

    From your description, I notice the issue you are experiencing is that it gives following error

    “ODBCMappingViewERROR [42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name '<Table Name>'” when you want to use ODBC DSN for accessing the data.

    If I have any misunderstood, please let me know.

    I notice “ODBC Mapping View ERROR [42S02]”.

    As far as I know it may be caused by an error from the database.

    And please see the link below that shows reason for “ODBC Mapping View ERROR [XXXXX]”:

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms714687(v=vs.85).aspx

    You can find the “ODBC Mapping View ERROR [42S02]”.

    It shows that base table or view not found:

    SQLExecDirect,SQLPrepare .

    Actually, the problem you are experiencing is more related with SQL Server Tools.

    And here is the forum link:

    http://social.msdn.microsoft.com/Forums/en-US/home?category=sqlserver.

    There you can find an expert to help you solve the problem better.

    Thanks for your understanding.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 19, 2013 5:59 AM

All replies

  • Hello Chirag,

    Welcome to MSDN forum.

    From your description, this thread is related to DataPlatform forum which is more suitable for it.

    I move it for you.

    This moderator and community will be glad to help you.

    Have a nice day!
    Damon


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 19, 2013 1:49 AM
  • Hello,

    Welcome toMSDN Support Forum.

    From your description, I notice the issue you are experiencing is that it gives following error

    “ODBCMappingViewERROR [42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name '<Table Name>'” when you want to use ODBC DSN for accessing the data.

    If I have any misunderstood, please let me know.

    I notice “ODBC Mapping View ERROR [42S02]”.

    As far as I know it may be caused by an error from the database.

    And please see the link below that shows reason for “ODBC Mapping View ERROR [XXXXX]”:

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms714687(v=vs.85).aspx

    You can find the “ODBC Mapping View ERROR [42S02]”.

    It shows that base table or view not found:

    SQLExecDirect,SQLPrepare .

    Actually, the problem you are experiencing is more related with SQL Server Tools.

    And here is the forum link:

    http://social.msdn.microsoft.com/Forums/en-US/home?category=sqlserver.

    There you can find an expert to help you solve the problem better.

    Thanks for your understanding.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 19, 2013 5:59 AM