FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Off Topic / Otros temas CGI xHarbour
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
CGI xHarbour
Posted: Mon Apr 20, 2009 07:05 AM
Dear friends, do you see anything wrong in the following code that I'm using as CGI?

Code (fw): Select all Collapse
oRs = CREATEOBJECT( "ADODB.Recordset" )

oRs:Open( "SELECT * FROM Contatti", cCns, adOpenForwardOnly, 
adLockOptimistic )

USE ( cUpl + "\CONTATTI" )

WHILE !EOF()
    oRs:AddNew()

    COPYREC( oRs )  // Copy all values from DBF to recordset

    oRs:Update()

    SKIP
ENDDO

CLOSE

oRs:Close()


I don't know why but it only adds a certain number of records (from 1000 to 2000) on 38000.

It works fine if used as normal local application.

Any ideas?

Thanks in advance.

EMG
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: CGI xHarbour
Posted: Tue Apr 21, 2009 07:40 PM

Enrico,

when the web app go in a large proccess, this can go to a time out with the server, I am sure this is your problem, maybe you can change some parameters in the web server

regards

Marcelo

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: CGI xHarbour
Posted: Tue Apr 21, 2009 08:01 PM

Thank you. Unfortunately the web server is not mine and I have no way to set its parameters. :-(

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: CGI xHarbour
Posted: Wed Apr 22, 2009 01:34 AM

Enrico,

Not sure if it may help in this case, but you could try to call SysRefresh() from inside the loop.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: CGI xHarbour
Posted: Wed Apr 22, 2009 07:14 AM

Already tried with HB_IDLESLEEP( 1 ) but the app just becomes slower. As Marcelo said, a timeout is the most likely cause. I'm going to do some tests with batch update mode trying to speed up the app.

EMG

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: CGI xHarbour
Posted: Wed Apr 22, 2009 09:11 AM

Batch update mode made no differences. Anyway, I made the app faster and now it seems to run fine! :-)

EMG

Continue the discussion