.NET Development
Reading VFP 9 with C#
Gravatar is a globally recognized avatar based on your email address. Reading VFP 9 with C#
  Nick
  All
  Mar 6, 2025 @ 01:25pm

Hi, I need to read some VFP 9 free tables and migrate them into SQL Server 2019. I was wondering if anyone had any experience with NUGET packages, for example.

VfpClient - A dedicated package for VFP connectivity

FoxProDataReader - Another popular package specifically for reading FoxPro/VFP data

OleDb with Microsoft.Data.OleDb - The standard approach using OLE DB Provider for Visual FoxPro

What would you recommend?

Thank you. Nick

Gravatar is a globally recognized avatar based on your email address. re: Reading VFP 9 with C#
  Rick Strahl
  Nick
  Mar 6, 2025 @ 01:34pm

If you're just reading data the VFP OleDb provider works reasonably well. Be aware though you need to explicitly run in 32 bit mode if I recall since the driver's not 64 bit.

Not familiar with the other solutions.

Another option if you need to migrate data to Sql Server - why not do the data conversion in VFP and either create a COM object that you can call from .NET or a standalone small EXE you can run since this is likely a tool that you only run a few times anyway.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Reading VFP 9 with C#
  Nick
  Rick Strahl
  Mar 6, 2025 @ 01:58pm

Thank you. As it turns out, this app will run multiple times a day, my goal is to run it off the task scheduler. I like your idea of turning it into a COM object and then calling it from C#.

I have a tool written in VFP that does the migration now, the problem I run into is when I compile it to a standalone executable, I seem to be having issues with the connection stream to SQL Server, running it through the IDE development, it has no problem.

thank you for your.

Nick ??

Gravatar is a globally recognized avatar based on your email address. re: Reading VFP 9 with C#
  Rick Strahl
  Nick
  Mar 7, 2025 @ 11:39am

Keep in mind you'll have the same 32 bit limitation for an inprocess COM object... host app needs to be 32 bit - unless you create an out of process EXE COM (DCOM) server.

+++ Rick ---

© 1996-2025