Cannot create an instance of OLE DB provider "VFPOLEDB"

Posted on 2014-07-16
Last Modified: 2014-12-04

I have a SQL instance which has a linked server to a Fox Pro instance via OLE.  I can query it within SQL Management Studio without issue.  If I use SQLCMD via a scheduled task to query it, I get the following error:

Cannot create an instance of OLE DB provider "VFPOLEDB" for linked server "LINKEDSERVERNAME".

I turned on In Process on the OLE Provider but that didn't make a difference, any ideas?
Question by:lm1189
    LVL 41

    Expert Comment

    Does the SQLCMD run as 32 bit application?
    Does the user under which the SQLCMD is running has full access rights to VFP OLE DB provider?
    LVL 29

    Accepted Solution

    It's sql server, which makes use of the Oledb provider, but when you use SQLCMD.exe, you have to use the 32bit version.

    Expand the details section of the download page you see there is a 32bit (x86) and a 64bit (x64) version.

    The prerequisite is the SQL Server ODBC Driver 11:

    In contrast to the SQLCMD.EXE (the MsSqlCmdLnUtils.msi) the ODBC driver installation (msodbcsql.msi) has to be the x64 one for a 64bit system, msodbcsql.msi installs both 32bit and 64bit odbc driver, and you find the msodbcsql11.dll in syswow64 and system32 after installing that.

    Then installing the x86 version of the MsSqlCmdLnUtils.msi installs the 32bit SQLCMD.EXE in C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\SQLCMD.EXE, and that's what you need to run to be able to use the 32bit OLEDB Provider for VFP.


    Bye, Olaf.
    LVL 29

    Expert Comment

    by:Olaf Doschke
    Any progress?

    Several other things, that would be helpful to know:

    How do you define your scheduled task, what is the sqlcmd call?
    What is the account, under which the scheduled task runs, is it a system or domain account?
    Does it run on the same server as the MSSQL Server?
    Is the VFP OLEDB Provider installed on the same server as the MSSQL Server?
    Is the VFP database located on the same server as the MSSQL Server?

    In short: More details about the setup.

    Are you using SQL Server Management Studio from a client or from the server?

    Bye, Olaf.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    Viewers will learn how the fundamental information of how to create a table.
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now