CGI xHarbour

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

CGI xHarbour

Post by Enrico Maria Giordano »

Dear friends, do you see anything wrong in the following code that I'm using as CGI?

Code: Select all

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
Marcelo Via Giglio
Posts: 1033
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: CGI xHarbour

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: CGI xHarbour

Post by Enrico Maria Giordano »

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

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: CGI xHarbour

Post by Antonio Linares »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: CGI xHarbour

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: CGI xHarbour

Post by Enrico Maria Giordano »

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

EMG
Post Reply