FiveDBU with ADO support

Re: FiveDBU with ADO support

Postby lucasdebeltran » Sat May 11, 2013 4:41 pm

Antonio,

Can you please show us how to work with MySQL?.

Thanks.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: FiveDBU with ADO support

Postby Marc Vanzegbroeck » Sat May 11, 2013 5:16 pm

lucasdebeltran wrote:Antonio,

Can you please show us how to work with MySQL?.

Thanks.


Lucas,

Here is an example for MySQL

Image
Image
Image
Image
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: FiveDBU with ADO support

Postby lucasdebeltran » Sat May 11, 2013 5:43 pm

Hello,

And why not use

cStr := "Driver={MySQL ODBC 3.51 Driver};Server=dolphintest.sitasoft.net;" + ;
"Database=dolphin_man;User=test_dolphin;Password=123456;Option=3;"

oDL := FW_OpenAdoConnection( cStr )

?

Thanks.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: FiveDBU with ADO support

Postby lucasdebeltran » Sat May 11, 2013 5:53 pm

When adding a record to MySQL, I get:

Error description: (DOS Error -2147352567) WINOLE/1007 El valor de BOF o EOF es True, o el actual registro se eliminó; la operación solicitada requiere un registro actual. (0x800A0BCD): ADODB.Recordset

Stack Calls
===========
Called from: => TOLEAUTO:MOVELAST( 0 )
Called from: fivedbu.prg => RSAPPENDBLANK( 533 )
Called from: fivedbu.prg => (b)ADOOPEN( 424 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 466 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 657 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1719 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1409 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3182 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 995 )
Called from: fivedbu.prg => MAIN( 65 )



RSAPPENDBLANK( 533 )

Code: Select all  Expand view
  oRS:MoveLast()
 



The table is empty.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: FiveDBU with ADO support

Postby Marc Vanzegbroeck » Sat May 11, 2013 5:57 pm

lucasdebeltran wrote:Hello,

And why not use

cStr := "Driver={MySQL ODBC 3.51 Driver};Server=dolphintest.sitasoft.net;" + ;
"Database=dolphin_man;User=test_dolphin;Password=123456;Option=3;"

oDL := FW_OpenAdoConnection( cStr )

?

Thanks.


That was used in the previous version. I like that one also more, but Antonio changed it like this (whitch is also nice)
Maybe it would be better to have the 2 options to connect to ADO.
Like this or with a connection-string
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: FiveDBU with ADO support

Postby Antonio Linares » Sat May 11, 2013 7:32 pm

Lucas,

We could use both ways. Creating an ODBC datasource from Windows and using it from FiveDBU seems a good way to avoid errors, but if you know the connection string for sure, then it is simpler than going the other way.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveDBU with ADO support

Postby Antonio Linares » Mon May 13, 2013 8:45 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests