I've just completed posting a 10-part series on my recent experiment trying
to make FoxPro work with DuckDB as well as my first real programming project
working with AI. The story is convoluted to say the least with Claude.AI and
I trying to find a way to work together efficiently and navigate all of the
rabbit holes we ended up going down to find a solution that ultimately far
exceeded my original expectations.
You can start at the beginning with Part 1, or skip to our final success in
Part 9. Either way, I hope someone else can take advantage of this
experiment. I also hope I don't look too dumb in the process of telling this
tale! <g>
I tried to keep each part as short as I could while including sample code
for you to review. There's even a download in Part 7 for a class Claude
wrote which gives you access to the low-level Win32 APIs to create Named
Pipes to a hidden shell process. Feel free to grab that and use it for you
own work if you need it.
Start here: http://www.paultarver.com/making-foxpro-ducky-part-1/
PS: Kurt you are going to love reading about my new wingman, Claude!!!
Thanks!
Paul H. Tarver
Tarver Program Consultants, Inc.
On Oct 19, 2026, at 16:36, paul@tpcqpc.com wrote:
>
> I tried to keep each part as short as I could while including sample code
> for you to review. There's even a download in Part 7 for a class Claude
> wrote which gives you access to the low-level Win32 APIs to create Named
> Pipes to a hidden shell process. Feel free to grab that and use it for you
> own work if you need it.
I’m surprised you didn’t ask Claude to help write a 32-bit ODBC driver for you! 😁
-- Ed Leafe
On Oct 19, 2026, at 17:27, Edward Leafe <ed@leafe.com> wrote:
>
> I’m surprised you didn’t ask Claude to help write a 32-bit ODBC driver for you! 😁
… so I did!
============================================================================================
> Would it be possible to write a 32-bit driver for DuckDB that could be used by Visual FoxPro 9? I don't know C/C++ or any other language that drivers are typically written in.
Yes, it’s possible in principle, but a true 32-bit driver is the hardest route. Easier ways to get VFP 9 talking to DuckDB exist, and none of them require you to learn C++.
Why it’s hard: VFP 9 is a 32-bit process, so it can only load 32-bit DLLs and 32-bit ODBC drivers. DuckDB’s official Windows builds, including the ODBC driver, are 64-bit only. Building a 32-bit version means compiling DuckDB from source in C++, and 32-bit Windows isn’t an officially supported target, so you’d be fighting build problems with no one to ask. I’d rule that out. (This is from my knowledge, so check DuckDB’s current release page in case it has changed.)
Practical options, easiest first:
1• Shell out to the DuckDB CLI. duckdb.exe is a 64-bit standalone program, and a 32-bit VFP app can still launch it. VFP writes a SQL string, runs it (via WScript.Shell or RUN), DuckDB exports the result to a CSV or JSON file, and VFP loads it with APPEND FROM ... TYPE CSV or similar. This takes about 20 lines of VFP code and needs no other language. It’s slowish per call because of process startup, so it suits reports, imports and batch work better than row-by-row lookups.
2• A small 64-bit helper service. A short Python script (a few dozen lines, using the duckdb package) listens on localhost HTTP, accepts SQL and returns JSON or CSV. VFP calls it with MSXML2.ServerXMLHTTP, which works fine in VFP 9. It keeps the database open between calls, so it’s much faster than option 1 and supports interactive use. I can write both the Python and the VFP side for you.
3• Use SQLite as the bridge. SQLite has solid 32-bit ODBC drivers that VFP handles well through SQL pass-through (SQLSTRINGCONNECT, SQLEXEC). DuckDB can read and write SQLite files, so you do the heavy analytics in DuckDB and exchange results with VFP through a SQLite file. It’s a good fit if you want normal-feeling VFP data access.
4• Exchange files. Parquet, CSV and JSON all work between the two, and DuckDB is very good at reading and writing them.
If your goal is analytics on large data, with VFP as the front end, I’d start with option 2, or option 1 if you want to avoid installing anything beyond duckdb.exe.
What is VFP doing in your setup: a desktop app that needs query results on screen, or batch processing? And do you have Python available, or do you want to avoid installing it? With that I can write the VFP code and any helper script for you.
============================================================================================
So it sounds like you ended up with a hybrid of #1 and #3. Of course, I would have gone with the Python option!
-- Ed Leafe
Maybe you should take a look at https://foxscript.org/ , which makes VFP a real 64bit version.
FoxScript (aka "FoxDev Studio") is a 64-bit runtime (Electron/Node.js, x64 packages) for Visual FoxPro 9. It supports DECLARE ... DLLs for 64-bit libraries within the same process and has implemented the SQL pass-through functions (SQLCONNECT, SQLSTRINGCONNECT, SQLEXEC, etc.) (listed as “Runs” in Language Coverage).
In a 64-bit process, ODBC accesses the 64-bit ODBC Driver Manager, this allows 64-bit ODBC drivers to be loaded and used. (32-bit drivers require the existing 32-bit bridge approach, as with FLLs.)
-----Ursprüngliche Nachricht-----
Von: Edward Leafe <ed@leafe.com>
Gesendet: Dienstag, 20. Oktober 2026 00:27
An: ProFox Email List <profox@leafe.com>
Betreff: Re: Making FoxPro Ducky - The Series
On Oct 19, 2026, at 16:36, paul@tpcqpc.com wrote:
>
> I tried to keep each part as short as I could while including sample code
> for you to review. There's even a download in Part 7 for a class Claude
> wrote which gives you access to the low-level Win32 APIs to create Named
> Pipes to a hidden shell process. Feel free to grab that and use it for you
> own work if you need it.
I’m surprised you didn’t ask Claude to help write a 32-bit ODBC driver for you! 😁
-- Ed Leafe
_______________________________________________
Post Messages to: profox@leafe.com
Subscription Maintenance: https://lists.leafe.com/postorius/lists/profox.leafe.com/
To unsubscribe send an email to profox-leave@leafe.com
OT-free version of this list: https://lists.leafe.com/postorius/lists/profoxtech.leafe.com/
Searchable Archive: https://leafe.com/archives
This message: https://leafe.com/archives/byMID/3A8DEC68-CF5D-46F3-BA32-14F1EC647897@leafe.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious
Ed, somehow, I knew you would have gone with Python! <g>
But where's the fun in doing something the easy way?
Maybe Claude remembered our journey and that's why it suggested #1 and #3. I know it took us a lot longer to come to that same conclusion.
Paul H. Tarver
Tarver Program Consultants, Inc.
-----Original Message-----
From: Edward Leafe <ed@leafe.com>
Sent: Monday, October 19, 2026 5:47 PM
To: ProFox Email List <profox@leafe.com>
Subject: Re: Making FoxPro Ducky - The Series
On Oct 19, 2026, at 17:27, Edward Leafe <ed@leafe.com> wrote:
>
> I’m surprised you didn’t ask Claude to help write a 32-bit ODBC driver
> for you! 😁
… so I did!
============================================================================================
> Would it be possible to write a 32-bit driver for DuckDB that could be used by Visual FoxPro 9? I don't know C/C++ or any other language that drivers are typically written in.
Yes, it’s possible in principle, but a true 32-bit driver is the hardest route. Easier ways to get VFP 9 talking to DuckDB exist, and none of them require you to learn C++.
Why it’s hard: VFP 9 is a 32-bit process, so it can only load 32-bit DLLs and 32-bit ODBC drivers. DuckDB’s official Windows builds, including the ODBC driver, are 64-bit only. Building a 32-bit version means compiling DuckDB from source in C++, and 32-bit Windows isn’t an officially supported target, so you’d be fighting build problems with no one to ask. I’d rule that out. (This is from my knowledge, so check DuckDB’s current release page in case it has changed.) Practical options, easiest first:
1• Shell out to the DuckDB CLI. duckdb.exe is a 64-bit standalone program, and a 32-bit VFP app can still launch it. VFP writes a SQL string, runs it (via WScript.Shell or RUN), DuckDB exports the result to a CSV or JSON file, and VFP loads it with APPEND FROM ... TYPE CSV or similar. This takes about 20 lines of VFP code and needs no other language. It’s slowish per call because of process startup, so it suits reports, imports and batch work better than row-by-row lookups.
2• A small 64-bit helper service. A short Python script (a few dozen lines, using the duckdb package) listens on localhost HTTP, accepts SQL and returns JSON or CSV. VFP calls it with MSXML2.ServerXMLHTTP, which works fine in VFP 9. It keeps the database open between calls, so it’s much faster than option 1 and supports interactive use. I can write both the Python and the VFP side for you.
3• Use SQLite as the bridge. SQLite has solid 32-bit ODBC drivers that VFP handles well through SQL pass-through (SQLSTRINGCONNECT, SQLEXEC). DuckDB can read and write SQLite files, so you do the heavy analytics in DuckDB and exchange results with VFP through a SQLite file. It’s a good fit if you want normal-feeling VFP data access.
4• Exchange files. Parquet, CSV and JSON all work between the two, and DuckDB is very good at reading and writing them.
If your goal is analytics on large data, with VFP as the front end, I’d start with option 2, or option 1 if you want to avoid installing anything beyond duckdb.exe.
What is VFP doing in your setup: a desktop app that needs query results on screen, or batch processing? And do you have Python available, or do you want to avoid installing it? With that I can write the VFP code and any helper script for you.
============================================================================================
So it sounds like you ended up with a hybrid of #1 and #3. Of course, I would have gone with the Python option!
-- Ed Leafe
_______________________________________________
Post Messages to: profoxtech@leafe.com
Subscription Maintenance: https://lists.leafe.com/postorius/lists/profoxtech.leafe.com/
To unsubscribe send an email to profoxtech-leave@leafe.com Full version of this list, including off-topic messages: https://lists.leafe.com/postorius/lists/profox.leafe.com/
Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/56ADFD0D-FCEA-4737-8B56-80822229414C@leafe.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious
I did consider using the 64-bit version of Visual FoxPro Advanced, but because of the nature of my work and even as much as I like VFPA, I haven't made the switch to VFPA for my distributed programs. The goal of this project was to see if I could use the tools I already had to make this work and minimize the changes I would have to make to integrate the functionality of DuckDB with my existing library.
Thanks for the recommendation, I'll take a look at the FoxScript project. That does look interesting.
Paul H. Tarver
Tarver Program Consultants, Inc.
-----Original Message-----
From: Jürgen Wondzinski <juergen@wondzinski.de>
Sent: Tuesday, October 20, 2026 4:52 AM
To: 'ProFox Email List' <profox@leafe.com>
Subject: AW: Making FoxPro Ducky - The Series
Maybe you should take a look at https://foxscript.org/ , which makes VFP a real 64bit version.
FoxScript (aka "FoxDev Studio") is a 64-bit runtime (Electron/Node.js, x64 packages) for Visual FoxPro 9. It supports DECLARE ... DLLs for 64-bit libraries within the same process and has implemented the SQL pass-through functions (SQLCONNECT, SQLSTRINGCONNECT, SQLEXEC, etc.) (listed as “Runs” in Language Coverage).
In a 64-bit process, ODBC accesses the 64-bit ODBC Driver Manager, this allows 64-bit ODBC drivers to be loaded and used. (32-bit drivers require the existing 32-bit bridge approach, as with FLLs.)
-----Ursprüngliche Nachricht-----
Von: Edward Leafe <ed@leafe.com>
Gesendet: Dienstag, 20. Oktober 2026 00:27
An: ProFox Email List <profox@leafe.com>
Betreff: Re: Making FoxPro Ducky - The Series
On Oct 19, 2026, at 16:36, paul@tpcqpc.com wrote:
>
> I tried to keep each part as short as I could while including sample
> code for you to review. There's even a download in Part 7 for a class
> Claude wrote which gives you access to the low-level Win32 APIs to
> create Named Pipes to a hidden shell process. Feel free to grab that
> and use it for you own work if you need it.
I’m surprised you didn’t ask Claude to help write a 32-bit ODBC driver for you! 😁
-- Ed Leafe
_______________________________________________
Post Messages to: profox@leafe.com
Subscription Maintenance: https://lists.leafe.com/postorius/lists/profox.leafe.com/
To unsubscribe send an email to profox-leave@leafe.com OT-free version of this list: https://lists.leafe.com/postorius/lists/profoxtech.leafe.com/
Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/3A8DEC68-CF5D-46F3-BA32-14F1EC647897@leafe.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious
_______________________________________________
Post Messages to: profoxtech@leafe.com
Subscription Maintenance: https://lists.leafe.com/postorius/lists/profoxtech.leafe.com/
To unsubscribe send an email to profoxtech-leave@leafe.com Full version of this list, including off-topic messages: https://lists.leafe.com/postorius/lists/profox.leafe.com/
Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/1813247918.46703.1792489950207@localhost
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious
Dang It Paul - this is yet another email that ended up in my GMail spam
folder. Oddly - some go in there - and others from ProFox do not. Even to
the extent that some emails for the SAME Posting go into Spam - whilst
others do not.
I had see Ed's reply about this - and got a bit of a chuckle from his
response. But, as I read it at work - I was viewing things Quickly. So -
sadly - I missed your Callout to my name. NOW - after finding this email in
my Spam - and reading it - and seeing my name - I Chuckled - and
Immediately Dived into your Rabbit Hole Deep Dive!!!
My Fav line from your Part 1 was - "...with my new best friend Claude".
I'm sure you know why. But, I will extrapolate - cause - I LITERALLY At
times tell people that my new BFF is actually Claude! And, I DAMN Well do
indeed Refer to Him as a Him!
Now it's time to continue reading your article - and move on to Part #2!
I am Truly Enjoying reading your writeup!!!
-K - The Bot-Guy/3D Printer guy... ...and Still doing VFP work.. - and
Converting to C# with my new BFF - Claude.ai!
Virus-free.www.avast.com
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Mon, Oct 19, 2026 at 5:36 PM <paul@tpcqpc.com> wrote:
> I've just completed posting a 10-part series on my recent experiment trying
> to make FoxPro work with DuckDB as well as my first real programming
> project
> working with AI. The story is convoluted to say the least with Claude.AI
> and
> I trying to find a way to work together efficiently and navigate all of the
> rabbit holes we ended up going down to find a solution that ultimately far
> exceeded my original expectations.
>
>
>
> You can start at the beginning with Part 1, or skip to our final success in
> Part 9. Either way, I hope someone else can take advantage of this
> experiment. I also hope I don't look too dumb in the process of telling
> this
> tale! <g>
>
>
>
> I tried to keep each part as short as I could while including sample code
> for you to review. There's even a download in Part 7 for a class Claude
> wrote which gives you access to the low-level Win32 APIs to create Named
> Pipes to a hidden shell process. Feel free to grab that and use it for you
> own work if you need it.
>
>
>
> Start here: http://www.paultarver.com/making-foxpro-ducky-part-1/
>
>
>
> PS: Kurt you are going to love reading about my new wingman, Claude!!!
>
>
>
> Thanks!
>
>
>
> Paul H. Tarver
> Tarver Program Consultants, Inc.
>
> _______________________________________________
> Post Messages to: profox@leafe.com
> Subscription Maintenance:
> https://lists.leafe.com/postorius/lists/profox.leafe.com/
> To unsubscribe send an email to profox-leave@leafe.com
> OT-free version of this list:
> https://lists.leafe.com/postorius/lists/profoxtech.leafe.com/
> Searchable Archive: https://leafe.com/archives
> This message:
> https://leafe.com/archives/byMID/18e901dd6011$de140f30$9a3c2d90$@tpcqpc.com
> ** All postings, unless explicitly stated otherwise, are the opinions of
> the author, and do not constitute legal or medical advice. This statement
> is added to the messages for those lawyers who are too stupid to see the
> obvious
>
Thanks, Kurt.
Your enthusiasm for Claude was one of the primary reasons I decided to try using Claude after so many previous disappointing efforts with other AI systems.
I hope you enjoy the journey I took.
Paul H. Tarver
Tarver Program Consultants, Inc.
-----Original Message-----
From: Kurt Wendt <kurthwendt@gmail.com>
Sent: Wednesday, October 21, 2026 4:54 PM
To: ProFox Email List <profox@leafe.com>
Subject: Re: Making FoxPro Ducky - The Series
Dang It Paul - this is yet another email that ended up in my GMail spam folder. Oddly - some go in there - and others from ProFox do not. Even to the extent that some emails for the SAME Posting go into Spam - whilst others do not.
I had see Ed's reply about this - and got a bit of a chuckle from his response. But, as I read it at work - I was viewing things Quickly. So - sadly - I missed your Callout to my name. NOW - after finding this email in my Spam - and reading it - and seeing my name - I Chuckled - and Immediately Dived into your Rabbit Hole Deep Dive!!!
My Fav line from your Part 1 was - "...with my new best friend Claude".
I'm sure you know why. But, I will extrapolate - cause - I LITERALLY At times tell people that my new BFF is actually Claude! And, I DAMN Well do indeed Refer to Him as a Him!
Now it's time to continue reading your article - and move on to Part #2!
I am Truly Enjoying reading your writeup!!!
-K - The Bot-Guy/3D Printer guy... ...and Still doing VFP work.. - and
Converting to C# with my new BFF - Claude.ai!
Virus-free.www.avast.com
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Mon, Oct 19, 2026 at 5:36 PM <paul@tpcqpc.com> wrote:
> I've just completed posting a 10-part series on my recent experiment
> trying to make FoxPro work with DuckDB as well as my first real
> programming project working with AI. The story is convoluted to say
> the least with Claude.AI and I trying to find a way to work together
> efficiently and navigate all of the rabbit holes we ended up going
> down to find a solution that ultimately far exceeded my original
> expectations.
>
>
>
> You can start at the beginning with Part 1, or skip to our final
> success in Part 9. Either way, I hope someone else can take advantage
> of this experiment. I also hope I don't look too dumb in the process
> of telling this tale! <g>
>
>
>
> I tried to keep each part as short as I could while including sample
> code for you to review. There's even a download in Part 7 for a class
> Claude wrote which gives you access to the low-level Win32 APIs to
> create Named Pipes to a hidden shell process. Feel free to grab that
> and use it for you own work if you need it.
>
>
>
> Start here: http://www.paultarver.com/making-foxpro-ducky-part-1/
>
>
>
> PS: Kurt you are going to love reading about my new wingman, Claude!!!
>
>
>
> Thanks!
>
>
>
> Paul H. Tarver
> Tarver Program Consultants, Inc.
>
> _______________________________________________
> Post Messages to: profox@leafe.com
> Subscription Maintenance:
> https://lists.leafe.com/postorius/lists/profox.leafe.com/
> To unsubscribe send an email to profox-leave@leafe.com OT-free version
> of this list:
> https://lists.leafe.com/postorius/lists/profoxtech.leafe.com/
> Searchable Archive: https://leafe.com/archives This message:
> https://leafe.com/archives/byMID/18e901dd6011$de140f30$9a3c2d90$@tpcqp
> c.com
> ** All postings, unless explicitly stated otherwise, are the opinions
> of the author, and do not constitute legal or medical advice. This
> statement is added to the messages for those lawyers who are too
> stupid to see the obvious
>
_______________________________________________
Post Messages to: profoxtech@leafe.com
Subscription Maintenance: https://lists.leafe.com/postorius/lists/profoxtech.leafe.com/
To unsubscribe send an email to profoxtech-leave@leafe.com Full version of this list, including off-topic messages: https://lists.leafe.com/postorius/lists/profox.leafe.com/
Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/CAAMUSVhokc1wuDQ9iy3CYMqtEEOSSxBhAP67deEJGaRcxsDsww@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious