Dbf/cdx to sql changing

User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Dbf/cdx to sql changing

Post by nageswaragunupudi »

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
User avatar
Uwe.Diemer
Posts: 98
Joined: Mon Aug 09, 2010 11:00 am

Re: Dbf/cdx to sql changing

Post by Uwe.Diemer »

What Borland Version is needed and which FWH Version

Tx
User avatar
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Dbf/cdx to sql changing

Post by Antonio Linares »

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
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Dbf/cdx to sql changing

Post by Enrico Maria Giordano »

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?
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Dbf/cdx to sql changing

Post by nageswaragunupudi »

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
wartiaga
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: Dbf/cdx to sql changing

Post by wartiaga »

nageswaragunupudi wrote:
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
Hi Nages,

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

Image

Thanks!
User avatar
Uwe.Diemer
Posts: 98
Joined: Mon Aug 09, 2010 11:00 am

Re: Dbf/cdx to sql changing

Post by Uwe.Diemer »

What libs are needed for fwh 32 and maria

tx
User avatar
vilian
Posts: 984
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Dbf/cdx to sql changing

Post by vilian »

Only LibMySql.lib
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
Posts: 984
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Dbf/cdx to sql changing

Post by vilian »

wartiaga wrote: Hi Nages,

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

Image

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
wartiaga
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: Dbf/cdx to sql changing

Post by wartiaga »

vilian wrote:
wartiaga wrote: Hi Nages,

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

Image

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?
User avatar
vilian
Posts: 984
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Dbf/cdx to sql changing

Post by vilian »

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
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Dbf/cdx to sql changing

Post by nageswaragunupudi »

Please use this revised maria01.prg

Code: Select all | Expand

#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
User avatar
Otto
Posts: 6378
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Dbf/cdx to sql changing

Post by Otto »

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

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Maurizio
Posts: 826
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Re: Dbf/cdx to sql changing

Post by Maurizio »

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.
2. 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.
3. 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.
4. 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.
5. 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.
6. 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
User avatar
Otto
Posts: 6378
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Dbf/cdx to sql changing

Post by Otto »

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Post Reply