FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MySQL, ADO and Browse
Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
MySQL, ADO and Browse
Posted: Thu Nov 23, 2006 06:56 PM

Does anybody out there has the correct connection string to make a MySQL Recordset to be "browseable" ??????

I have browsed recordsets of Oracle, ADS, Access, SQL Server, and ALL these using the very same methodology, I mean modifying the movement blocks for the browse, and all worked as expecte, exept mysql.

Any workaround ?

Saludos

R.F.
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
MySQL, ADO and Browse
Posted: Thu Nov 23, 2006 08:12 PM
Hi Rene

look this

    ...
    StrDatabase   := [SGEA]
    StrServer     := [127.0.0.1]
    StrUserID     := [root]
    StrUserPWD    := [root]

    StrTable      := [pessoas]
    StrField      := [estado]
    StrField2     := [nome]
    StrWhere      := StrField+[="PR"]

    StrConnection := [driver={MySQL ODBC 3.51 Driver};database=]+StrDatabase+[;server=]+StrServer+[;uid=]+StrUserID+[;pwd=]+StrUserPWD+[;option=35]
    StrSqlCommand := [SELECT * FROM ] + StrTable + [ WHERE ] + StrWhere

    oRs := TOleAuto():New( "ADODB.Recordset" )

    oRS:CursorType     := adOpenStatic
    oRS:CursorLocation := adUseClient
    oRS:LockType       := adLockPessimistic

    oRS:Open( StrSqlCommand, StrConnection, 1, 3 )
    ...


This help you?
Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
MySQL, ADO and Browse
Posted: Thu Nov 23, 2006 08:26 PM

Thanks a lot !!!!!

I was missing the cursor location, I wonder why this was working on other databases.

Saludos

R.F.
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
MySQL, ADO and Browse
Posted: Thu Nov 23, 2006 08:34 PM

Rene

With ADO you can work with various DBs

This is ShowDeBola!!!

Continue the discussion