Porting FW to FWH using MySql
Porting FW to FWH using MySql
Hi all,
I'm porting my applications from FW to FWH .
I use MySql , and in FW I used class TDbOdbc in this way :
oDbf := TDbOdbc():new("SELECT * FROM mytab....... " , oOdbc)
and then I scan ODbf structure to retrieve data .
I use this method also in FWH and it work fine: why Antonio says that Tdbodbc is only for 16 bits ?
Is there any warning ?
best regards
wzaf
I'm porting my applications from FW to FWH .
I use MySql , and in FW I used class TDbOdbc in this way :
oDbf := TDbOdbc():new("SELECT * FROM mytab....... " , oOdbc)
and then I scan ODbf structure to retrieve data .
I use this method also in FWH and it work fine: why Antonio says that Tdbodbc is only for 16 bits ?
Is there any warning ?
best regards
wzaf
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Porting FW to FWH using MySql
Wzaf,
You can also use Class TDbODBC in 32 bits if you need it
You can also use Class TDbODBC in 32 bits if you need it
Re: Porting FW to FWH using MySql
Thank you for your answer, Antonio ,
Anyway i started to port my programs to ADO and Adordd (with some difficulties) .
I use ADODB.connection and ADODB.recordset object, but I'm not able to find documentation: Do you know where I can find it ?
Best regards
Wzaf.
Anyway i started to port my programs to ADO and Adordd (with some difficulties) .
I use ADODB.connection and ADODB.recordset object, but I'm not able to find documentation: Do you know where I can find it ?
Best regards
Wzaf.
Re: Porting FW to FWH using MySql
Dear Mr.Wzaf,
Regards
Anser
http://www.w3schools.com/ado/default.aspI'm not able to find documentation: Do you know where I can find it ?
Regards
Anser
Re: Porting FW to FWH using MySql
Tank you Anser,
a very good site.
I still have a difficulty to handle the errors on a 'connection:execute' command :
Do you know how to catch the returned errors ?
Tank you
Regards
Wzaf
a very good site.
I still have a difficulty to handle the errors on a 'connection:execute' command :
Do you know how to catch the returned errors ?
Tank you
Regards
Wzaf
Re: Porting FW to FWH using MySql
Dear Mr.Wzaf,
Regards
Anser
Code: Select all
Local oError
TRY
oCmd:Execute()
CATCH oError
MsgInfo( " Error No: "+AllTrim(STR(oError:NativeError))+CRLF+;
" Description : "+oError:Description)
END
Anser
Re: Porting FW to FWH using MySql
Dear Anser,
Thank you , but I already tried this method and I get : "No exported method: NATIVEERROR" ,
instead the "oError:description" works fine.
Best regards
Wzaf
Thank you , but I already tried this method and I get : "No exported method: NATIVEERROR" ,
instead the "oError:description" works fine.
Best regards
Wzaf
Re: Porting FW to FWH using MySql
Dear Mr.Wzaf,
I hope that u r using ADO. Can u please provide the following info.
MySQL Ver
ODBC Driver ver
Your connection string
Regards
Anser
I hope that u r using ADO. Can u please provide the following info.
MySQL Ver
ODBC Driver ver
Your connection string
Regards
Anser
Re: Porting FW to FWH using MySql
Dear Anser
Here they are :
mysql: 5.0.67
odbc: mysql ODBC 5.1 driver : 5.01.06.00
cConnectString := "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=mydb; User=myuser;Password=mypassw;Option=3"
best regards
Wzaf
Here they are :
mysql: 5.0.67
odbc: mysql ODBC 5.1 driver : 5.01.06.00
cConnectString := "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=mydb; User=myuser;Password=mypassw;Option=3"
best regards
Wzaf
Re: Porting FW to FWH using MySql
Are you able to connect to the database ?. If not please try the following con. string
Try the following connection string
Regards
Anser
Try the following connection string
Code: Select all
"Driver={MySQL ODBC 5.1 Driver};Server=192.168.0.170;Port=3306;Database=YourDbName;User=YourUserName;Password=YourPassword;Option=3;"
Anser
Re: Porting FW to FWH using MySql
Anser ,
All works fine : I connect successfully : I correctly do SELECT and UPDATE in database.
I'm not able to correctly view the ADO errors (if there are...)
Regards
Wzaf
All works fine : I connect successfully : I correctly do SELECT and UPDATE in database.
I'm not able to correctly view the ADO errors (if there are...)
Regards
Wzaf
Re: Porting FW to FWH using MySql
Dear Mr.Wzaf,
Regards
Anser
Code: Select all
*---------------------------------------------------*
Function ShowSqlError(oError)
*---------------------------------------------------*
FOR EACH oError IN oApp:oConnection:Errors
MsgInfo( " Error No: "+AllTrim(STR(oError:NativeError))+CRLF+;
" Descripcion : "+oError:Description, oApp:cAppName)
oApp:nLastErrorNo:=oError:NativeError
NEXT
RETURN ( NIL )
Anser
Re: Porting FW to FWH using MySql
Thank you Anser , but what is object oApp ?
regards
Wzaf
regards
Wzaf
Re: Porting FW to FWH using MySql
Mr.Wzaf,
Instead of oApp:oConnection you may use your Connection Object
Regards
Anser
Instead of oApp:oConnection you may use your Connection Object
Code: Select all
*---------------------------------------------------*
Function ShowSqlError(oConnection)
*---------------------------------------------------*
FOR EACH oError IN oConnection:Errors
MsgInfo( " Error No: "+AllTrim(STR(oError:NativeError))+CRLF+;
" Descripcion : "+oError:Description)
NEXT
RETURN ( NIL )
Anser
Re: Porting FW to FWH using MySql
Dear Anser,
sorry but doesn't work
I get always "Argument error: __OLEENUMCREATE"
in line :
FOR EACH oError IN oConnection:Errors
regards
Wzaf
sorry but doesn't work
I get always "Argument error: __OLEENUMCREATE"
in line :
FOR EACH oError IN oConnection:Errors
regards
Wzaf