AndrewMozley
Programmer
I have a source of data (created by MySQL). I can connect to this data source using ODBC and I can import this data into a cursor, from where I can display it. In essence my code so far consists of :
This all works, and I am able to browse the table. I would later like to update a record in Table1 (not its real name) in the schema. Rather optimistically, I have this code :
However this command does not work, because VFP looks for a table table1.dbf, and prompts for its folder. Is it possible that I have to use SQLEXEC commands - is that the standard way to communicate with an SQL database from VFP? Or is there a 'native' SQL command within VFP?
What do I need to use please. I would mention that I have done a lot of work with traditional VFP databases, but I am not familiar with the SQL approach.
Thanks as always
Code:
.zConnect = "Driver = {MySQL ODBC 5.2a Driver}; Server=localhost; Database=anm_schema; . . .
SQLSTRINGCONNECT(.zConnect)
lResult = SQLEXEC(.zHandle,"SELECT * FROM table1")
This all works, and I am able to browse the table. I would later like to update a record in Table1 (not its real name) in the schema. Rather optimistically, I have this code :
Code:
UPDATE table1 SET PRODUCT = "XYZ" WHERE RECNO() = 1
However this command does not work, because VFP looks for a table table1.dbf, and prompts for its folder. Is it possible that I have to use SQLEXEC commands - is that the standard way to communicate with an SQL database from VFP? Or is there a 'native' SQL command within VFP?
What do I need to use please. I would mention that I have done a lot of work with traditional VFP databases, but I am not familiar with the SQL approach.
Thanks as always