FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dbf/cdx to sql changing
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Dbf/cdx to sql changing
Posted: Mon Jul 15, 2024 03:21 PM
Uwe.Diemer wrote:II also want to change from Ads to MariaDb im using xHarbour should i change to Harbour ?

r´tx
you can use Harbour or xHarbour.
bcc or msvc
32 bits or 64 bits
Compatible with all.
Regards



G. N. Rao.

Hyderabad, India
Posts: 99
Joined: Mon Aug 09, 2010 11:00 AM
Re: Dbf/cdx to sql changing
Posted: Tue Jul 16, 2024 12:56 PM

What Borland Version is needed and which FWH Version

Tx

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Dbf/cdx to sql changing
Posted: Tue Jul 16, 2024 01:30 PM

Current FWH version is 24.04 and it uses bcc 7.7, or Microsoft Visual Studio 2022, or MinGW

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Dbf/cdx to sql changing
Posted: Tue Jul 16, 2024 04:03 PM
Antonio Linares wrote:https://fivetechsupport.com/forums/viewtopic.php?p=270797&sid=6a21201c0921588724b55c882db5adec#p270797

mod_Harbour working on bluehost where only php is accepted
https://www.fivetechsoft.com/counter/modpro_.php
Interesting! How is it possible? Can you explain in a few words, please?
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 03:30 AM
Uwe.Diemer wrote:What Borland Version is needed and which FWH Version

Tx
FWH MariaDB internal library is available in all versions from 2017.
If you are currently using any FWH Version from 2017 onwards, you can straightway use FWH's mariadb functionality with the same bcc and same fwh

Try samples\maria01.prg, maria02.prg. etc
Regards



G. N. Rao.

Hyderabad, India
Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 12:00 PM
nageswaragunupudi wrote:
What Borland Version is needed and which FWH Version

Tx
FWH MariaDB internal library is available in all versions from 2017.
If you are currently using any FWH Version from 2017 onwards, you can straightway use FWH's mariadb functionality with the same bcc and same fwh

Try samples\maria01.prg, maria02.prg. etc
Hi Nages,

I'm testing maria01.prg and I get this error:



Thanks!
Posts: 99
Joined: Mon Aug 09, 2010 11:00 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 02:13 PM

What libs are needed for fwh 32 and maria

tx

Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 02:26 PM

Only LibMySql.lib

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 02:29 PM
wartiaga wrote: Hi Nages,

I'm testing maria01.prg and I get this error:



Thanks!
I think you have a problem in your Maria Connection(Eg user name, password, etc). Could you show how are you doing this ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 04:48 PM
vilian wrote:
Hi Nages,

I'm testing maria01.prg and I get this error:



Thanks!
I think you have a problem in your Maria Connection(Eg user name, password, etc). Could you show how are you doing this ?
Vilian I try maria01.prg (without any changes) in samples folder, I think this sample conects a cloud database, Am I wrong?
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 05:22 PM

Yes, you can. Are you using maria01.prg by this way?

  oCn  := maria_Connect( aStr[ 1 ], .t. )

What is aStr's content ? I think your content is out of date.

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 05:54 PM
Please use this revised maria01.prg
Code (fw): Select all Collapse
#include "fivewin.ch"

REQUEST DBFCDX

static aStr := { "208.91.198.197:3306,fwhdemo,gnraofwh,Bharat@1950", ;
                 "209.250.245.152,fwh,fwhuser,FiveTech@2022" }
static oCn

function Main()

   local aTables

   SET DATE ITALIAN
   SET CENTURY ON

   FW_SetUnicode( .t. )

   CursorWait()
   oCn      := maria_Connect( aStr[ 1 ], .t. )
   aTables  := oCn:ListTables()

   XBROWSER oCn:ListTables() ;
      TITLE "Dbl-Click to View Table" ;
      SHOW RECID ;
      SETUP ( ;
      oBrw:aCols[ 1 ]:bLDClickData := { |r,c,f,o| ShowTable( o:Value ) }, ;
      oBrw:bDropFiles := { |aFiles| xbrowse( aFiles ) } )

   oCn:Close()

return nil


function ShowTable( cTable )

   local oRs, nSecs  := SECONDS()

   if cTable == "custbig"
      MsgRun( "Reading " + cTable, "Please wait", { || oRs   := oCn:RecSet( cTable, -100 ) } )
   else
      MsgRun( "Reading " + cTable, "Please wait", { || oRs   := oCn:RowSet( cTable ) } )
   endif
   nSecs    := SECONDS() - nSecs

   XBROWSER oRs TITLE cTable + " (" + cValToChar( nSecs ) + ") seconds" ;
      FASTEDIT NOMODAL SHOW RECID

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 08:55 PM
Hello friends,

I took the opportunity to use the SQL server provided by FIVETECH to run some tests.
Am I doing something wrong here, or does accessing SQL really take that long?
The server might be weak.

Accessing SQL from here takes 1.12 seconds. Creating a "web xbrowser" is difficult here because navigating with over a second delay is not elegant.

When I load the same from my web server, it takes 129 ms. This means DBF is approximately 8.68 times faster than SQL.

I think one has to be more cautious with SQL.

Best regards,
Otto



Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Dbf/cdx to sql changing
Posted: Thu Jul 18, 2024 06:55 AM

Hello Otto

I don't want to get into the discussion of whether DBF or SQL is better as the gap is so wide that no comparisons can be made.

I can say that my small company would be dead now if I hadn't started using SQL 10 years ago.

Demonstrating the advantage of using an SQL database over DBF (Database File) can be divided into several categories: performance, scalability, data integrity, security, advanced features, and compatibility.

  1. Performance

Query Optimization: SQL databases offer query optimization through indexes, query plans, and caching.

Concurrency: SQL DBMS are designed to handle multiple connections and simultaneous operations more efficiently than DBF, which can have issues with file locking.

  1. Scalability

Handling large volumes of data: SQL databases can handle large volumes of data more effectively by distributing the load across multiple servers and using table partitioning.

Load Balancing: SQL databases can be distributed across multiple servers, improving scalability and availability.

  1. Data Integrity

Integrity Constraints: SQL databases support integrity constraints such as primary keys, foreign keys, and unique constraints, ensuring data integrity.

ACID Transactions: SQL databases support transactions that adhere to ACID properties (Atomicity, Consistency, Isolation, Durability), ensuring data consistency.

  1. Security

Access Control: SQL databases offer sophisticated access control mechanisms and user authentication.

Data Encryption: Data in SQL databases can be encrypted both at rest and in transit.

  1. Advanced Features

Stored Procedures and Triggers: SQL databases support stored procedures and triggers that allow automation of many database operations.

Advanced Query Features: SQL offers advanced features such as complex joins, subqueries, CTEs (Common Table Expressions), and aggregation functions.

  1. Compatibility

Interoperability: SQL databases are widely supported and compatible with a wide range of programming languages, reporting tools, and business applications.

Standardization: SQL is an ISO/IEC standard, meaning that SQL knowledge is transferable between different database management systems.

Maurizio

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Dbf/cdx to sql changing
Posted: Thu Jul 18, 2024 07:47 AM

Hello Maurizio,

Thanks for your contribution.

But who needs this in a hotel administration?


Can you say something specific about the speed?

What does it look like for you when you make a query to your SQL server and simply read 20 records into a table?

We at FIVEWIN appreciate the xBrowser, and this functionality must also fit into the web application.

Best regards,

Otto