Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8043799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:01:31+00:00 2026-06-05T05:01:31+00:00

Dear Stackoverflow community, I am a little bit confused using the VFPOleDb Library (9.0Sp2)

  • 0

Dear Stackoverflow community,

I am a little bit confused using the VFPOleDb Library (9.0Sp2) in Visual Studio 2010 with .NET 4.0 Client Profile.
What do I want to do? Edit existing and create new FoxPro Database files using C#.

Trying to compile my own example and based upon the examples seen in “How to create a dbf file from scratch in C#” (1), “How do I read a FoxPro 8.0 database from C#” (2) and “Programming databasing with Visual FoxPro” (3) I receive a compilation error: “Feature not available”.
Stacktracing the Exception Message shows me that the OleDbConnection Factory doesn’t recognize the connection string?
I already added the ‘Interop.VFPOLEDBLib’ as a Reference but I wasn’t able to add the ‘vfpoledb.dll’ because of a missing manifest file?

Code-Example

using System;
using System.IO;
using System.Data;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Data.Common;


    namespace VFPExample
    {

        class VFPExample
        {
            /*
            https://stackoverflow.com/questions/754436/odbc-dbf-files-in-c-sharp/

            http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic62548.aspx
            */

            static void Main(String[] args)
            {

                {
                    string strTestDirectory = @"Provider=VFPOLEDB.1; DataSource=D:\TEMP\";

                    using (OleDbConnection vfpro_con_insert =
                    new OleDbConnection(strTestDirectory) )
                    {
                    vfpro_con_insert.Open(); // FIXME: Ex.Message: "Feature not available"; 

                    OleDbCommand createTable = new OleDbCommand(@"Create Table TestDBF (Field1 I, Field2 C(10))", vfpro_con_insert);
                    OleDbCommand insertTable1 = new OleDbCommand(@"Insert Into TestDBF Values (1, 'Hello')", vfpro_con_insert);
                    OleDbCommand insertTable2 = new OleDbCommand(@"Insert Into TestDBF Values (2, 'World')", vfpro_con_insert);

                    createTable.ExecuteNonQuery();
                    insertTable1.ExecuteNonQuery();
                    insertTable2.ExecuteNonQuery();

                    Console.WriteLine("Wrote in " + vfpro_con_insert.DataSource);
                    }

                    Console.ReadLine();

                    /*
                --------------------------------------------------------------------------------
                    */

                    using (OleDbConnection vfpro_con_read = new OleDbConnection(strTestDirectory))
                    {
                        vfpro_con_read.Open();

                        OleDbCommand readTable = new OleDbCommand("Select * From TestDBF (Field1 I, Field2 C(10))", vfpro_con_read);

                        OleDbDataAdapter da = new OleDbDataAdapter(readTable);

                        DataSet ds = new DataSet();
                        //  DataRow dr = new DataRow();

                        da.Fill(ds);

                        foreach (DataRow dr in ds.Tables[0].Rows)
                        {
                            Console.WriteLine(dr.ItemArray[1].ToString());
                        }

                    }

                    Console.ReadLine();

                }
                catch (Exception e)
                {
                    Console.WriteLine("\n\n Exception:\n\n{0}", e.Message); // Set Breakpoint here for detailed StackTrace
                }
            }

        }
    }

StackTrace

> e {"Feature is not available."}   System.Exception {System.Data.OleDb.OleDbException}
>       [System.Data.OleDb.OleDbException]
>       {"Feature is not available."}
>       System.Data.OleDb.OleDbException
> Data  {System.Collections.ListDictionaryInternal}
>        System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
> HelpLink  null    string
> InnerException    null    System.Exception
> Message   "Feature is not available." string
> Source    "Microsoft OLE DB Provider for Visual FoxPro"   string
> StackTrace    "
>    at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
>    at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
>    at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
>    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
>    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
>    at System.Data.OleDb.OleDbConnection.Open()
>    at bestsellerList.VFPExample.Main(String[] args)
>    in  D:\Visual Studio 2010\Projects\VFPExample\VFPExample.cs:Line 37."  string
> TargetSite    {Void .ctor(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.OleDbConnection)}    System.Reflection.MethodBase {System.Reflection.RuntimeConstructorInfo}
>    Static Member      
>    No(t) public Member        
> e.Message "Feature is not available." string

(Tried to fix localization)

So I need some clarifications regarding VFPOleDb/ Visual FoxPro in Visual Studio:

  • Is the Visual FoxPro Library only supported with .NET Client Profile 2.0 and/or Visual Studio 2003/5 (and earlier)?
    Besides I can clearly see that VSFoxPro (5) reached its End of Product Lifecycle (4) — at least for Mainstream Support. Extended Support is still granted until 2015.
    Are there any other (semi)official Documents or Blog entries from Microsoft regarding migration of FoxPro Databases? Already seen “Migrating from Visual FoxPro” (6).

  • Are there any successful compilations reported with .NET 3.x (Client Profile) and above?

  • What am I missing in my code example and/or Reference in Visual Studio?


So, I took the example-code, modified it to my needs — to read one table with six columns and many, many rows which is exported as a csv file; works fine on my local machine (as usual, as we all know) — and copied the executable to a Windows 2008 Server R2 with installed .NET 3.5.x and tried to start the application. Did you already do a well educated guess?

Once again I receive the same Exception as the first time but this time it looks like that

            DataSet ds = new DataSet();
            da.Fill(ds); // throws Exception

da.Fill(ds) is the troublemaker but this makes really no sense for me, because I also copied the compiled example-application based on the corrected code to the server and it just does what it is supposed to do…

Thanks for any hints.

Exception

System.Data.OleDb.OleDbException: Feature is not available.
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Program.Main(String[] args)


System.Collections.ListDictionaryInternal

   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Program.Main(String[] args)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:01:44+00:00Added an answer on June 5, 2026 at 5:01 am

    The “Feature is not available” exception is due to an incorrect connection string. Use “Data Source” instead of “DataSource.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dear members of the Stackoverflow community, We are developing a web application using the
Dear all trader and API Gurus, Thank you in advance. Background: Visual Studio 2010,
Dear all, I am using java rmi for my program, from client side i
Dear stackoverflow community, I have a simple menu that have to be dynamics. With
dear all i want to know how to submit asp.net form data using jquery
Dear stackoverflow members, I have a small problem, I want to replace some characters
Dear Friends from Stackoverflow, Please help me with a problem that i'm having when
Dear all hibernate developers, The following hibernate hbm2java class I am using in my
Dear experts, I was trying to dynamically generate DOM elements using JS. I read
dear all..i've a textfield, it using barcode scanner for input data..after scan it shows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.