FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Help MySql Database concept?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Help MySql Database concept?
Posted: Sun Feb 09, 2014 11:29 AM
Dear All,

I just try to work with MySql (on web hosting). I would like to know the real working concept. Because when I use from my small knowledge the problem is the connection and reading not stable. It shows the data less than 1 seconds for 2 or 3 times and then the next time will take 5-10 seconds and next may be over 10 seconds. The problem might be my knowledge in RDBMS on web. I am not sure the real concept to access, read and write procedure.
My flow is below;
Code (fw): Select all Collapse
Function Main()
oServer := MySqlServer()

   Workaround()

oServer:End()
return nil

Function Workaround()
oDb := MySqlQuery()
... do something..
oDb:end()
return nil


Thanks in advance for any help and idea.
Regards,

Dutch



FWH 2304 / 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)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Help MySql Database concept?
Posted: Sun Feb 09, 2014 12:50 PM
Dutch,

dutch wrote:It shows the data less than 1 seconds for 2 or 3 times and then the next time will take 5-10 seconds and next may be over 10 seconds.


It could be a problem of the server where MySQL is installed.

EMG
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Help MySql Database concept?
Posted: Mon Feb 10, 2014 01:45 AM

Dear EMG,

Thank you again EMG. I'm not quit sure my idea that my understood correct or not?
oServer:Query() = DbUseArea()
oDb:End() = DbCloseArea()
Can I use it often as DBFCDX? Because I will open() when I use and close() when finish.

Regards,
Dutch

Regards,

Dutch



FWH 2304 / 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)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Help MySql Database concept?
Posted: Mon Feb 10, 2014 09:01 AM
Dutch,

dutch wrote:Dear EMG,

Thank you again EMG. I'm not quit sure my idea that my understood correct or not?
oServer:Query() = DbUseArea()
oDb:End() = DbCloseArea()
Can I use it often as DBFCDX? Because I will open() when I use and close() when finish.

Regards,
Dutch


Sorry, I don't know what MySqlServer() does. Anyway, you can open and close queries as many as you want but keep in mind that any queries will require to download all the records in the recordset from the database server.

EMG
Posts: 581
Joined: Tue Oct 11, 2005 11:28 AM
Re: Help MySql Database concept?
Posted: Sat Feb 15, 2014 12:12 AM

Dutch,

Maybe this helps. http://www.chriscalender.com/?p=1278

Kleyber Derick



FWH / xHb / xDevStudio / SQLLIB

Continue the discussion