none
could not retrieve schema information for table or view

    Question

  • I am using oracle and trying to create a datagridview but when i try to create the dataset i get the error "could not retrieve schema information for table or view" stating my database and table name.  I am using the Oracle client not the OLEDB as i have always used that and had no problems.  I am using Oracle 11g.  Is there any known reason for this error?
    Wednesday, August 05, 2009 11:30 AM

Answers

  • Hello,

     

    The error "Could not load file or assembly 'microsoft.sqlserver.types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' " looks like this assembly is missed from the GAC.  Actually, the Microsoft.SqlServer.Types.dll assembly is shipped with SQL Server Client. When deploying, we can also install a redistributable package instead of the whole SQL client to include this assembly.(http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en)  I am not sure why it is required when you are consuming Oracle database through Oracle Data Provider. It looks like the Oracle Data Provider for Visual Studio is problematical. But for they are third-partiy products from Oracle. I think the better forums for asking this question is
    http://forums.oracle.com/forums/category.jspa?categoryID=19 

    I would like to suggest to post the question there. Experts may give quick help if this is a known issue. 
     By the way, when you raise the thread there, I suggest to mention the version of Oracle Data Provider for .NET.

     

    Ji Zhou

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, August 10, 2009 10:57 AM

All replies

  • Could you post your code and identify where the exception occurs?
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, August 05, 2009 12:44 PM
  • There is no code, i drag and drop a datagridview onto my form and then drop down the data source combobox and select add project datasource.  Then i select database then new connection where i select the Oracle database (Oracle client) put in username and password and database SID and test the connection, which is fine and then next and select the fields from the table i want, click Finish and that is where i get the error. 
    Wednesday, August 05, 2009 2:07 PM
  • Hello SquadShun,

     

    Based on my understanding, you are using Oracle Data Provider for .NET to connect the Oracle database from your application, right? 

    http://www.oracle.com/technology/tech/windows/odpnet/index.html

    For this provider as well as Oracle database are not third-party products, so I cannot test this scenario in my side now. But currently, based on my research on the net, somebody has encountered a very similar issue on MySQL database.
    http://www.vbforums.com/showthread.php?t=511672

    It causes from the Visual Studio generates a wrong SQL command. As a workaround, we can modify the select command VS produces automatically in the Wizard to make it work. You can see the second-to-last post in this thread,
    http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/d421773a-6267-4adc-9c4f-495b9a96ccb5/

    Please let us know if this resolves your issue. Have a nice day!

     

    Ji Zhou

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, August 06, 2009 8:26 AM
  • Sadly no it didn't fix it.  Still get the same error.  I also got the following error when i was looking at the SQL statement:
    Could not load file or assembly 'microsoft.sqlserver.types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.  The system cannot find the file specified.
    Friday, August 07, 2009 8:34 AM
  • I have just had someone using a machine that is set up identically to mine except it uses Oracle 10g rather than 11g (which all the connection info says should work) and the same thing occurs which points to a bug in VS2008.  This is something i need to work, can anyone thing of any kind of workaround?
    Friday, August 07, 2009 10:16 AM
  • Hello,

     

    The error "Could not load file or assembly 'microsoft.sqlserver.types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' " looks like this assembly is missed from the GAC.  Actually, the Microsoft.SqlServer.Types.dll assembly is shipped with SQL Server Client. When deploying, we can also install a redistributable package instead of the whole SQL client to include this assembly.(http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en)  I am not sure why it is required when you are consuming Oracle database through Oracle Data Provider. It looks like the Oracle Data Provider for Visual Studio is problematical. But for they are third-partiy products from Oracle. I think the better forums for asking this question is
    http://forums.oracle.com/forums/category.jspa?categoryID=19 

    I would like to suggest to post the question there. Experts may give quick help if this is a known issue. 
     By the way, when you raise the thread there, I suggest to mention the version of Oracle Data Provider for .NET.

     

    Ji Zhou

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, August 10, 2009 10:57 AM
  • I found the solution ! Just install the nuget package Windows.SqlServer.Types
    from Visual studio->view->other windows -> package manger console , run next command
    PM> Install-Package Microsoft.SqlServer.Types

    And then

    Solution > References > System.Data.Entity > Properties > Copy Local, and setting it to True.

    Note: Copy Local for Microsoft.SqlServer.Types was already set to true, and even though the problem was with System.Data.Entity, the error message was still about Microsoft.SqlServer.Types.

    vola , every thing is ok now

    Tuesday, May 20, 2014 7:58 AM