FiveWin & MySql

Post Reply
User avatar
avista
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

FiveWin & MySql

Post by avista »

Hi all,

I am planing to test MySql database with FiveWin,
Please information which is the best version of MySql
and if possible link where to download it from

Best Regards,
elvira
Posts: 462
Joined: Fri Jun 29, 2012 12:49 pm

Re: FiveWin & MySql

Post by elvira »

Hello Avista,

I recomend to you to use ADO and TDataRow class. There are many samples on the fórum.

This is a recent one:

Code: Select all

#include "fivewin.ch"
#include "adodef.ch"
#include "xbrowse.ch"

function Main()

   local oCn, oRs
   local oWnd, oFont, oBrw, oMiSort

   SET DATE ITALIAN
   SET CENTURY ON

   oCn      := FW_OpenAdoConnection( "c:\fwh\samples\" )
   oRs      := FW_OpenRecordSet( oCn, "SALES" )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE WINDOW oWnd TITLE "DBF TABLE THROUGH ADO"
   oWnd:SetFont( oFont )

   DEFINE BUTTONBAR oWnd:oBar SIZE 100,32 2010
   DEFINE BUTTON OF oWnd:oBar PROMPT "Add"    ACTION oBrw:Edit( .t. )
   DEFINE BUTTON OF oWnd:oBar PROMPT "Edit"   ACTION oBrw:Edit()
   DEFINE BUTTON OF oWnd:oBar PROMPT "Delete" ACTION oBrw:Delete()
   DEFINE BUTTON OF oWnd:oBar PROMPT "Report" ACTION oBrw:Report()
   DEFINE BUTTON OF oWnd:oBar PROMPT "Close"  ACTION oWnd:End()

   SET MESSAGE OF oWnd TO "" 2010
   DEFINE MSGITEM oMiSort PROMPT If( Empty( oRs:Sort ), "NATURAL", oRs:Sort ) ;
      SIZE 200
   oMiSort:bMsg   := { || If( Empty( oRs:Sort ), "NATURAL", oRs:Sort ) }

   @ 0,0 XBROWSE oBrw OF oWnd DATASOURCE oRs ;
      AUTOCOLS AUTOSORT CELL LINES NOBORDER FOOTERS

   AEval( oBrw:aCols, { |o| If( o:cDataType == 'N', o:nFooterType := AGGR_SUM, nil ) } )
   WITH OBJECT oBrw
      :nEditTypes       := EDIT_GET
      :bLClickHeaders   := { || oMiSort:Refresh() }
      :MakeTotals()
      //
      :CreateFromCode()
   END
   oWnd:oClient   := oBrw
   ACTIVATE WINDOW oWnd
   RELEASE FONT oFont

   oRs:Close()
   oCn:Close()

return nil
User avatar
avista
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: FiveWin & MySql

Post by avista »

Elvira,

Thaanks for reply,

Byt my basic question is:

Which is the best version of MySql
and if possible link where to download it from


Regards,
LordJonas
Posts: 35
Joined: Wed Jun 30, 2010 8:04 pm

Re: FiveWin & MySql

Post by LordJonas »

Hi....

Regarding the "best version of MySQL" the answer is simple: the lastest stable version...
The link is http://dev.mysql.com/downloads/mysql/

But if you want a true "open-source" database why not give a try to MariaDB ? It's even better than MySQL and it's really "open-source"
https://downloads.mariadb.org/

Regards,
João Ferreira
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Re: FiveWin & MySql

Post by Jack »

Hi,
Could you post a connection string (ado) with MySql .

Should we install an ODBC driver for MySql , witch one , 32 or 64 bits ?

Thanks a lot .
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: FiveWin & MySql

Post by anserkk »

Jack wrote:Could you post a connection string (ado) with MySql .
cConnectionString := "Driver={MySQL ODBC 5.3 Unicode Driver};Server=YourServersIP;Port=3306;Database=YourDatabseName;User=YourUserName;Password=YourPassword;Option=3;"
Jack wrote: Should we install an ODBC driver for MySql , witch one , 32 or 64 bits ?
Yes, You should install ODBC Driver for MySQL
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Re: FiveWin & MySql

Post by Jack »

Thanks for this answer .

For the ODBC, we have only to install it, not configure in the ODBC Screen ?

Odbc 32 or 64 bits ?

Could you post a link ?

Thanks
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: FiveWin & MySql

Post by anserkk »

Jack wrote:Thanks for this answer .

For the ODBC, we have only to install it, not configure in the ODBC Screen ?

Odbc 32 or 64 bits ?

Could you post a link ?

Thanks
You just have to install the ODBC connector for your OS (64 or 32 bit). There is nothing to configure.

Download link

http://dev.mysql.com/downloads/connector/odbc/
Post Reply