Dbf/cdx to sql changing

Re: Dbf/cdx to sql changing

Postby nageswaragunupudi » Mon Jul 15, 2024 3: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
User avatar
nageswaragunupudi
 
Posts: 10478
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Dbf/cdx to sql changing

Postby Uwe.Diemer » Tue Jul 16, 2024 12:56 pm

What Borland Version is needed and which FWH Version

Tx
User avatar
Uwe.Diemer
 
Posts: 97
Joined: Mon Aug 09, 2010 11:00 am

Re: Dbf/cdx to sql changing

Postby Antonio Linares » Tue Jul 16, 2024 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41866
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dbf/cdx to sql changing

Postby Enrico Maria Giordano » Tue Jul 16, 2024 4: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?
User avatar
Enrico Maria Giordano
 
Posts: 8538
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Dbf/cdx to sql changing

Postby nageswaragunupudi » Wed Jul 17, 2024 3: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
User avatar
nageswaragunupudi
 
Posts: 10478
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Dbf/cdx to sql changing

Postby wartiaga » Wed Jul 17, 2024 12:00 pm

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

Re: Dbf/cdx to sql changing

Postby Uwe.Diemer » Wed Jul 17, 2024 2:13 pm

What libs are needed for fwh 32 and maria

tx
User avatar
Uwe.Diemer
 
Posts: 97
Joined: Mon Aug 09, 2010 11:00 am

Re: Dbf/cdx to sql changing

Postby vilian » Wed Jul 17, 2024 2:26 pm

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

Re: Dbf/cdx to sql changing

Postby vilian » Wed Jul 17, 2024 2:29 pm

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

Re: Dbf/cdx to sql changing

Postby wartiaga » Wed Jul 17, 2024 4:48 pm

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

Re: Dbf/cdx to sql changing

Postby vilian » Wed Jul 17, 2024 5: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
User avatar
vilian
 
Posts: 961
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Dbf/cdx to sql changing

Postby nageswaragunupudi » Wed Jul 17, 2024 5:54 pm

Please use this revised maria01.prg
Code: Select all  Expand view
#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
nageswaragunupudi
 
Posts: 10478
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Dbf/cdx to sql changing

Postby Otto » Wed Jul 17, 2024 8: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

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6255
Joined: Fri Oct 07, 2005 7:07 pm

Re: Dbf/cdx to sql changing

Postby Maurizio » Thu Jul 18, 2024 6: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.
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
Maurizio
 
Posts: 807
Joined: Mon Oct 10, 2005 1:29 pm

Re: Dbf/cdx to sql changing

Postby Otto » Thu Jul 18, 2024 7: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6255
Joined: Fri Oct 07, 2005 7:07 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 26 guests