I have been experimenting (more like messing around) with ways to create an API to VFP data.
The reason for this is to be able to leave our existing or other third party VFP apps doing what they do but provide the information within them to other parties via an API.
I quite easily created a simple REST API using Node/Express and a ODBC/OLEDB package, but I found the package providing the connection to the data source either lacking documentation or difficult to setup.
Having started my thoughts with stacks, like the MEAN stack I knew there was so much information and so many packages out there that make working with data sources like Mongo/MySQL etc so easy.
I then ventured into MariaDB and its CONNECT engine type allowing me to add data as a table into a MariaDB database from an external source, it’s not importing this data just linking to it.
Once added which was a simple as CREATE TABLE customers ENGINE=connect table_type=ODBC connection=’DSN=mydbc’ I could query away.
Going back to node I can now use packages which help me use MariaDB as a datasource 😊
Just wondered if any of you had been down this route, or similar?
Because some of the applications I need to do this with are not ours I don’t have the option of saying why are we still using VFP data instead of a backend like Mysql or SQL Server in the first place.
TIA
Chris.
Hi Chris,
I haven't been down that path specifically. I have been down the path of connecting to VFP data with ODBC. We found that our old code base with Clipper/FoxBase style coding in many places that update our DBFs, and an ODBC updating the same DBFs caused CDX and FPT corruptions. If you are only reading though the ODBC, you should be fine. If your VFP code uses buffering and maybe transactions, you should be fine.
We went with writing a VFP COM that uses buffering and transactions, and a C# service to host it for API access.
Hope that helps, Tracy
P.S. Shameless plug http://swfox.net/SessionsSWFOX.aspx#Implementing_a_VFP_COM_Object_in_a_C_Pro...
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Chris Davis Sent: Thursday, July 11, 2019 11:15 AM To: profoxtech@leafe.com Subject: VFP Data / Node / MariaDB
I have been experimenting (more like messing around) with ways to create an API to VFP data.
The reason for this is to be able to leave our existing or other third party VFP apps doing what they do but provide the information within them to other parties via an API.
I quite easily created a simple REST API using Node/Express and a ODBC/OLEDB package, but I found the package providing the connection to the data source either lacking documentation or difficult to setup.
Having started my thoughts with stacks, like the MEAN stack I knew there was so much information and so many packages out there that make working with data sources like Mongo/MySQL etc so easy.
I then ventured into MariaDB and its CONNECT engine type allowing me to add data as a table into a MariaDB database from an external source, it’s not importing this data just linking to it.
Once added which was a simple as CREATE TABLE customers ENGINE=connect table_type=ODBC connection=’DSN=mydbc’ I could query away.
Going back to node I can now use packages which help me use MariaDB as a datasource 😊
Just wondered if any of you had been down this route, or similar?
Because some of the applications I need to do this with are not ours I don’t have the option of saying why are we still using VFP data instead of a backend like Mysql or SQL Server in the first place.
TIA
Chris. [excessive quoting removed by server]
Thanks Tracy
Are the issues with using ODBC and CDX / FPT corruptions a known issue?
Is that specifically the VFP ODBC drive or OLEDB as well?
Thanks
Chris.
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: Thursday, 11 July 2019 16:28 To: profoxtech@leafe.com Subject: RE: VFP Data / Node / MariaDB
Hi Chris,
I haven't been down that path specifically. I have been down the path of connecting to VFP data with ODBC. We found that our old code base with Clipper/FoxBase style coding in many places that update our DBFs, and an ODBC updating the same DBFs caused CDX and FPT corruptions. If you are only reading though the ODBC, you should be fine. If your VFP code uses buffering and maybe transactions, you should be fine.
We went with writing a VFP COM that uses buffering and transactions, and a C# service to host it for API access.
Hope that helps, Tracy
P.S. Shameless plug http://swfox.net/SessionsSWFOX.aspx#Implementing_a_VFP_COM_Object_in_a_C_Pro...
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Chris Davis Sent: Thursday, July 11, 2019 11:15 AM To: profoxtech@leafe.com Subject: VFP Data / Node / MariaDB
I have been experimenting (more like messing around) with ways to create an API to VFP data.
The reason for this is to be able to leave our existing or other third party VFP apps doing what they do but provide the information within them to other parties via an API.
I quite easily created a simple REST API using Node/Express and a ODBC/OLEDB package, but I found the package providing the connection to the data source either lacking documentation or difficult to setup.
Having started my thoughts with stacks, like the MEAN stack I knew there was so much information and so many packages out there that make working with data sources like Mongo/MySQL etc so easy.
I then ventured into MariaDB and its CONNECT engine type allowing me to add data as a table into a MariaDB database from an external source, it’s not importing this data just linking to it.
Once added which was a simple as CREATE TABLE customers ENGINE=connect table_type=ODBC connection=’DSN=mydbc’ I could query away.
Going back to node I can now use packages which help me use MariaDB as a datasource 😊
Just wondered if any of you had been down this route, or similar?
Because some of the applications I need to do this with are not ours I don’t have the option of saying why are we still using VFP data instead of a backend like Mysql or SQL Server in the first place.
TIA
Chris. [excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/001301d537fd$40ab9d60$c202d820$@powerchurch... ** 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. Report [OT] Abuse: http://leafe.com/reportAbuse/001301d537fd$40ab9d60$c202d820$@powerchurch.com
You're welcome,
I saw it with both the last ODBC driver (which if memory serves doesn't support AutoInc), and the last OLEDB.
I didn't see any corruption in my testing when the data only had read/write by the ODBC or OLEDB. It was always with both modified the same tables.
Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Chris Davis Sent: Thursday, July 11, 2019 11:38 AM To: profoxtech@leafe.com Subject: RE: VFP Data / Node / MariaDB
Thanks Tracy
Are the issues with using ODBC and CDX / FPT corruptions a known issue?
Is that specifically the VFP ODBC drive or OLEDB as well?
Thanks
Chris.
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Tracy Pearson Sent: Thursday, 11 July 2019 16:28 To: profoxtech@leafe.com Subject: RE: VFP Data / Node / MariaDB
Hi Chris,
I haven't been down that path specifically. I have been down the path of connecting to VFP data with ODBC. We found that our old code base with Clipper/FoxBase style coding in many places that update our DBFs, and an ODBC updating the same DBFs caused CDX and FPT corruptions. If you are only reading though the ODBC, you should be fine. If your VFP code uses buffering and maybe transactions, you should be fine.
We went with writing a VFP COM that uses buffering and transactions, and a C# service to host it for API access.
Hope that helps, Tracy
P.S. Shameless plug http://swfox.net/SessionsSWFOX.aspx#Implementing_a_VFP_COM_Object_in_a_C_Pro...
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Chris Davis Sent: Thursday, July 11, 2019 11:15 AM To: profoxtech@leafe.com Subject: VFP Data / Node / MariaDB
I have been experimenting (more like messing around) with ways to create an API to VFP data.
The reason for this is to be able to leave our existing or other third party VFP apps doing what they do but provide the information within them to other parties via an API.
I quite easily created a simple REST API using Node/Express and a ODBC/OLEDB package, but I found the package providing the connection to the data source either lacking documentation or difficult to setup.
Having started my thoughts with stacks, like the MEAN stack I knew there was so much information and so many packages out there that make working with data sources like Mongo/MySQL etc so easy.
I then ventured into MariaDB and its CONNECT engine type allowing me to add data as a table into a MariaDB database from an external source, it’s not importing this data just linking to it.
Once added which was a simple as CREATE TABLE customers ENGINE=connect table_type=ODBC connection=’DSN=mydbc’ I could query away.
Going back to node I can now use packages which help me use MariaDB as a datasource 😊
Just wondered if any of you had been down this route, or similar?
Because some of the applications I need to do this with are not ours I don’t have the option of saying why are we still using VFP data instead of a backend like Mysql or SQL Server in the first place.
TIA
Chris. [excessive quoting removed by server]