Page 2 of 4
Re: Dbf/cdx to sql changing
Posted: Mon Jul 15, 2024 3:21 pm
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.
Re: Dbf/cdx to sql changing
Posted: Tue Jul 16, 2024 12:56 pm
by Uwe.Diemer
What Borland Version is needed and which FWH Version
Tx
Re: Dbf/cdx to sql changing
Posted: Tue Jul 16, 2024 1:30 pm
by Antonio Linares
Current FWH version is 24.04 and it uses bcc 7.7, or Microsoft Visual Studio 2022, or MinGW
Re: Dbf/cdx to sql changing
Posted: Tue Jul 16, 2024 4:03 pm
by Enrico Maria Giordano
Interesting! How is it possible? Can you explain in a few words, please?
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 3:30 am
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
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 12:00 pm
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:
Thanks!
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 2:13 pm
by Uwe.Diemer
What libs are needed for fwh 32 and maria
tx
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 2:26 pm
by vilian
Only LibMySql.lib
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 2:29 pm
by vilian
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 ?
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 4:48 pm
by wartiaga
vilian wrote: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 ?
Vilian I try maria01.prg (without any changes) in samples folder, I think this sample conects a cloud database, Am I wrong?
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 5:22 pm
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.
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 5:54 pm
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
Re: Dbf/cdx to sql changing
Posted: Wed Jul 17, 2024 8:55 pm
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
Re: Dbf/cdx to sql changing
Posted: Thu Jul 18, 2024 6:55 am
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
Re: Dbf/cdx to sql changing
Posted: Thu Jul 18, 2024 7:47 am
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