Page 1 of 1

CGI xHarbour

Posted: Mon Apr 20, 2009 7:05 am
by Enrico Maria Giordano
Dear friends, do you see anything wrong in the following code that I'm using as CGI?

Code: Select all | Expand

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

Re: CGI xHarbour

Posted: Tue Apr 21, 2009 7:40 pm
by Marcelo Via Giglio
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

Re: CGI xHarbour

Posted: Tue Apr 21, 2009 8:01 pm
by Enrico Maria Giordano
Thank you. Unfortunately the web server is not mine and I have no way to set its parameters. :-(

EMG

Re: CGI xHarbour

Posted: Wed Apr 22, 2009 1:34 am
by Antonio Linares
Enrico,

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

Re: CGI xHarbour

Posted: Wed Apr 22, 2009 7:14 am
by Enrico Maria Giordano
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

Re: CGI xHarbour

Posted: Wed Apr 22, 2009 9:11 am
by Enrico Maria Giordano
Batch update mode made no differences. Anyway, I made the app faster and now it seems to run fine! :-)

EMG