none
OLE connection to SQL string: Provider=MSDataShape;Data Provider=SQLOLEDB is generating an error message RRS feed

  • Question

  • I want to use MSDataShape and I have seen many examples online 

    to make an OLE connection to SQL and the connection string should be ("Provider=MSDataShape;Data Provider=SQLOLEDB")

    for example I just found on the following site http://www.a1vbcode.com/vbtip-102.asp the aforementioned example.

    I also installed the best OLE driver for SQL "msoledbsql_18.3.0.0x64.msi"

    However, when I tried to make the connection to SQL 2014 Server, I got an error message:

    System.Data.OleDb.OleDbException: 'Data provider could not be created. Class not registered'

    This exception was originally thrown at this call stack:
    System.Data.OleDb.OleDbConnectionInternal.OleDbConnectionInternal(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.OleDbConnection)
    System.Data.OleDb.OleDbConnectionFactory.CreateConnection(System.Data.Common.DbConnectionOptions, System.Data.Common.DbConnectionPoolKey, object, System.Data.ProviderBase.DbConnectionPool, System.Data.Common.DbConnection)
    System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionPoolGroup, System.Data.Common.DbConnectionOptions)
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(System.Data.Common.DbConnection, System.Threading.Tasks.TaskCompletionSource<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions, System.Data.ProviderBase.DbConnectionInternal, out System.Data.ProviderBase.DbConnectionInternal)
    System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions)
    System.Data.ProviderBase.DbConnectionInternal.OpenConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory)
    System.Data.OleDb.OleDbConnection.Open()
        Tenants.ChovPopUp.POfPdtls(String) in ChovPopUp.vb
        Tenants.ChovPopUp.ChovPopUp_Load(Object, System.EventArgs) in ChovPopUp.vb
    System.Windows.Forms.Form.OnLoad(System.EventArgs)
        ...
        [Call Stack Truncated]



    Can someone suggest a solution how I can accomplish creating a connection without generating error messages?



    Wednesday, February 12, 2020 9:11 PM

All replies

  • Hello,

    Not sure if your connection string is okay as per this page.

    if you installed 64 bit version, try uninstalling and installing the 32 bit version

    https://www.microsoft.com/en-us/download/details.aspx?id=56730



    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, February 13, 2020 12:19 AM
    Moderator
  • i neede to for conecect to Sql server 64BIt

    only 1 report thet runs the SHAPE Command like this

    TtlS = "SHAPE {" & sqlSql & "} "
                TtlS &= "APPEND ({" & subSql & "} AS TDtl "
                TtlS &= "RELATE tID TO tID) AS TDtl"

    i need the "MSDataShape" to work

    i need it in 64 bit

    Thursday, February 13, 2020 2:40 PM
  • i neede to for conecect to Sql server 64BIt

    only 1 report thet runs the SHAPE Command like this

    TtlS = "SHAPE {" & sqlSql & "} "
                TtlS &= "APPEND ({" & subSql & "} AS TDtl "
                TtlS &= "RELATE tID TO tID) AS TDtl"

    i need the "MSDataShape" to work

    i need it in 64 bit

    Sorry but I can't help with this. There is really no significant reason for using 64 bit as I see it overall.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, February 13, 2020 2:44 PM
    Moderator