What is the solution for Harbour Sql?

What is the solution for Harbour Sql?

Postby MFarias » Tue Jul 01, 2014 4:08 pm

I see on the internet some tools for FiveWin with Harbour and am using Sql with some questions, wanted to know what you guys have used for this? :?: :)
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
MFarias
 
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: What is the solution for Harbour Sql?

Postby Antonio Linares » Tue Jul 01, 2014 4:20 pm

Matheus,

ADO is a great choice. There are many examples in these forums and also FWH provides great functions to manage it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41476
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: What is the solution for Harbour Sql?

Postby MFarias » Tue Jul 01, 2014 5:02 pm

Antonio,
I already have seen some example of ADO in FiveWin and even use this function in some reports that I took the sources and adapted to my use:
I can deal with it better as I want the returns and evaluate the performace based on the mass amount of data it is used.
but then I ask you, regarding the performace or layers created for access, it would be possible, I wish to use with remote servers and the like, would be viable? (Ie with Mysql or MsSql for example)
Code: Select all  Expand view

Function SqlQuery( cSql, lRecordSet,lExecute, lCompact )

   && exemplo -> aresp:=SqlQuery([SELECT CODIPRO FROM PRODUTOS WHERE NOMEPRO LIKE '%B%'])

   local uRet    := {} // Retorno com Registros
   local oRs, nAt , oCn // Objetos de controle para o ODBC e o Registro
   Local cArquivo  := &(Alias())->( DbInfo( DBI_FULLPATH ) )
    Local cDiretorio:= iif ( Empty( cFilePath(cArquivo)) , Curdrive()+':'+curdir()+'\',cFilePath(cArquivo) )

   DEFAULT lCompact  := .t.
   DEFAULT lRecordSet  := .f.

   cSql     := Upper( alltrim(cSql) )

   oCn := FW_OpenAdoConnection( [Provider=Microsoft.Jet.OLEDB.4.0;Data Source=]+cDiretorio+[ ;Extended Properties=dBASE IV;User ID=Admin;Password=] ,.t.)
   DEFAULT lExecute  := !( LEFT( cSql, 7 ) == '
SELECT ' )
    if oCn != nil
       if lExecute
          TRY
             uRet := oCn:Execute( cSql )
          CATCH
          END
          return uRet
       else
           oRs      := FW_OpenRecordSet( oCn, cSql )
            if lRecordSet
               uRet := oRs
            else
               if oRs != nil
                  if oRs:RecordCount() > 0
                     uRet := oRs:GetRows()
                     oRs:MoveFirst()
                  endif
                  oRs:Close()
                  if lCompact
                     if Len( uRet ) == 1
                        uRet  := uRet[ 1 ]
                        if Len( uRet ) == 1
                           uRet  := uRet[ 1 ]
                        endif
                     endif
                  endif
               endif
        endif
       endif
    endif
   return uRet
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
MFarias
 
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: What is the solution for Harbour Sql?

Postby Antonio Linares » Tue Jul 01, 2014 5:09 pm

Matheus,

If you are going to use MySQL and not other database engine, then you can use Daniel's TDolphin and this way ADO is not required.

Regarding ADO performance with remote database engines, I let other users comment about their experiences. I have just used ADO locally.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41476
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: What is the solution for Harbour Sql?

Postby Enrico Maria Giordano » Tue Jul 01, 2014 5:39 pm

Antonio,

Antonio Linares wrote:Regarding ADO performance with remote database engines, I let other users comment about their experiences. I have just used ADO locally.


ADO performance is very good with remote database engines. I used it in many web projects and in one xHarbour/FWH project and had no complains from the customers.

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

Re: What is the solution for Harbour Sql?

Postby Marc Vanzegbroeck » Tue Jul 01, 2014 5:44 pm

Antonio Linares wrote:
Regarding ADO performance with remote database engines, I let other users comment about their experiences. I have just used ADO locally.


Antonio,

Als my customers are very happy after I changed from DBF to ADO.
It's faster and more solid. I didn't have any corrupted databases anymore. Especially on networks.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: What is the solution for Harbour Sql?

Postby Armando » Tue Jul 01, 2014 6:43 pm

Friends:

My five cents, as all of you said, I have an App since 2007 with MySql and ADO, and not
problems at all.

I advise you, ADO + MySql + FW, and nothing else

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3106
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: What is the solution for Harbour Sql?

Postby nageswaragunupudi » Tue Jul 01, 2014 11:07 pm

I used ADO for many years with Oracle, MSSql, MySql (recently) on remote and local. This is the best option.

When we deal with huge tables, we need to change our habits to open full tables like in xBase. We should learn to fall in line with the rest of the world to limit reading only to the required part of the table.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10347
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: What is the solution for Harbour Sql?

Postby MFarias » Wed Jul 02, 2014 2:36 pm

Well folks,
I installed the drive in my machine mysql to use with ado, someone would have some basic examples of connection and processing of such data to provide? :wink:
FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
User avatar
MFarias
 
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: What is the solution for Harbour Sql?

Postby Horizon » Wed Jul 02, 2014 4:50 pm

MFarias wrote:Well folks,
I installed the drive in my machine mysql to use with ado, someone would have some basic examples of connection and processing of such data to provide? :wink:


I also need advice. Which mysql version should i download. MySQL Server??. or something else?

Thanks.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: What is the solution for Harbour Sql?

Postby dutch » Fri Jul 04, 2014 1:14 am

Dear All,

I'm trying to move to SQL via ADO now.

What does it mean "remote database engines" ?
Is it the same as program access via internet IP to database server directly? or
Is the program access database on Web Hosting via IP or URL?

What is the different?

Regards,
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: What is the solution for Harbour Sql?

Postby Enrico Maria Giordano » Fri Jul 04, 2014 8:03 am

Dutch,

dutch wrote:What does it mean "remote database engines" ?


Just a database engine that is not local, ie. accessible only through a network by an IP address.

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


Return to FiveWin for Harbour/xHarbour

Who is online

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

cron