Fivewin/xharbour with ActiveX Data Objects (ado) and MySQL

Re: Fivewin/xharbour with ActiveX Data Objects (ado) and MySQL

Postby pieter » Wed Feb 04, 2015 3:54 pm

Hello,

I want to thank all the community members who made it possible, that I now have a working CRUD application(with Fivewin/xharbour with ActiveX Data Objects (ado) and MySQL). That CRUD application or atleast a working connection with fivedbu and mysql was my goal of this week, and today this goal is acomplished. Create, Retrieve, Update, Delete are all working.

Kind regards,

Pieter :D
User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

Re: Fivewin/xharbour with ActiveX Data Objects (ado) and MySQL

Postby Antonio Linares » Wed Feb 04, 2015 4:59 pm

Very good :-)
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: Fivewin/xharbour with ActiveX Data Objects (ado) and MySQL

Postby Enrico Maria Giordano » Thu Feb 05, 2015 10:08 am

I can't get this connection string to work:

Code: Select all  Expand view
#include "Emag.ch"


FUNCTION MAIN()

    LOCAL cCns := "Driver={MySQL ODBC 5.3 Driver};Server=<server>;Database=<database>;User=<user>;Password=<password>;Option=133121"

    LOCAL oCn := CREATEOBJECT( "ADODB.Connection" )

    oCn:Open( cCns )

    oCn:Close()

    ? "OK!"

    RETURN NIL


While this works fine (with the old connector installed, of course):

Code: Select all  Expand view
#include "Emag.ch"


FUNCTION MAIN()

    LOCAL cCns := "Driver={MySQL ODBC 5.1 Driver};Server=<server>;Database=<database>;User=<user>;Password=<password>;Option=133121"

    LOCAL oCn := CREATEOBJECT( "ADODB.Connection" )

    oCn:Open( cCns )

    oCn:Close()

    ? "OK!"

    RETURN NIL


Any ideas?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Fivewin/xharbour with ActiveX Data Objects (ado) and MySQL

Postby pieter » Thu Feb 05, 2015 10:41 am

Hello Enrico,

I have tested the following connectionstring (in Fivedbu.prg):

Driver={MySQL ODBC 5.3 Unicode Driver};Server=localhost;Port=3306;Database=world;User=root;Password=<rootpassword>;Option=133121;

It gives a succesfull connection.

Maybe there are two reasons that your connection string is not working.

1: you have {MySQL ODBC 5.3 Driver} instead of {MySQL ODBC 5.3 Unicode Driver} (or try: {MySQL ODBC 5.3 Ansi Driver} )
2: Port=3306 is misssing.

Best regards,

Pieter
User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

Re: Fivewin/xharbour with ActiveX Data Objects (ado) and MySQL

Postby Enrico Maria Giordano » Thu Feb 05, 2015 10:46 am

Thank you Pieter! I just found a minute ago that Ansi or Unicode were required! :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 88 guests