MySQL, ADO and Browse

MySQL, ADO and Browse

Postby R.F. » Thu Nov 23, 2006 6: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.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby Rochinha » Thu Nov 23, 2006 8:12 pm

Hi Rene

look this

Code: Select all  Expand view
    ...
    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?
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby R.F. » Thu Nov 23, 2006 8:26 pm

Thanks a lot !!!!!

I was missing the cursor location, I wonder why this was working on other databases.
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby Rochinha » Thu Nov 23, 2006 8:34 pm

Rene

With ADO you can work with various DBs

This is ShowDeBola!!!
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests