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

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

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

Post by pieter »

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
Antonio Linares
Site Admin
Posts: 42662
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 69 times
Been thanked: 96 times
Contact:

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

Post by Antonio Linares »

Very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8770
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 7 times
Contact:

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

Post by Enrico Maria Giordano »

I can't get this connection string to work:

Code: Select all | Expand

#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

#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
pieter
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

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

Post by pieter »

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
Enrico Maria Giordano
Posts: 8770
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 7 times
Contact:

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

Post by Enrico Maria Giordano »

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

EMG
Post Reply