MySql
hello
I am trying to get some data out of a MySql-database using the LibMySql.dll
library. (ODBC is too slow and using the ADODB via a cursoradaptor consumes
a lot of memory).
I don't have much experience using DLL functions in VFP, but I managed to
connect to the mysql host and execute a SQL-command.
But I have problems using the MYSQL_FETCH_ROW function
It should return an array but I don't know how to impement that in VFP.
It should be something like this:
** VFP_CODE
DECLARE ? mysql_fetch_row IN libmySQL.dll ;
LONG lMYSQL_RES
...
IF mysql_query(db_id, "select * from table")=0
lnResult_Id = mysql_store_result(db_id)
laRow = mysql_fetch_row(lnResult_Id)
messagebox(laRow[1])
ENDIF
I could use some help, please.
Henri
# 1 Re: MySql
Henri -
Usually if you find the odbc connection to be too slow - then something is
wrong with your network pipe back to the linux server. I have systems that
handle 250K record inserts per half hour on a 10 megabit connect [250 byte
recordsize] and to me thats an acceptable thresh hold.
If the remote views in vfp are too slow for you - have you tried coding up a
sql pass through ??
There are examples of doing this up on :
http://fox.wikis.com/wc.dll?Wiki~VFPmySQLLinuxP1~VFP
On that same 10 megabit link - I'm able to retrieve about 2 million records
per hour on a 1022 byte record size table .
Using libMySql.dll is typically more C++ suited, and I don't recommend using
it in vfp - but you can.
Troll around the mysql database groups and u will see some examples on how
to do it in vb -
you should be able to convert it to vfp coding .
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:excel-info@efgroup.net
mySql / VFP / MS-SQL
"Henri van Balkom" <hvbalkom@freeler.nl> wrote in message
news:3f453221$1@tnews.web.dev-archive.com...
>
> hello
>
> I am trying to get some data out of a MySql-database using the
LibMySql.dll
> library. (ODBC is too slow and using the ADODB via a cursoradaptor
consumes
> a lot of memory).
>
> I don't have much experience using DLL functions in VFP, but I managed to
> connect to the mysql host and execute a SQL-command.
>
> But I have problems using the MYSQL_FETCH_ROW function
> It should return an array but I don't know how to impement that in VFP.
>
>
> It should be something like this:
>
>
> ** VFP_CODE
> DECLARE ? mysql_fetch_row IN libmySQL.dll ;
> LONG lMYSQL_RES
>
> ..
>
> IF mysql_query(db_id, "select * from table")=0
> lnResult_Id = mysql_store_result(db_id)
> laRow = mysql_fetch_row(lnResult_Id)
> messagebox(laRow[1])
> ENDIF
>
>
> I could use some help, please.
>
> Henri