CGI xHarbour

CGI xHarbour

Postby Enrico Maria Giordano » Mon Apr 20, 2009 7:05 am

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

Code: Select all  Expand view
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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: CGI xHarbour

Postby Marcelo Via Giglio » Tue Apr 21, 2009 7: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
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: CGI xHarbour

Postby Enrico Maria Giordano » Tue Apr 21, 2009 8:01 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: CGI xHarbour

Postby Antonio Linares » Wed Apr 22, 2009 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: CGI xHarbour

Postby Enrico Maria Giordano » Wed Apr 22, 2009 7: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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: CGI xHarbour

Postby Enrico Maria Giordano » Wed Apr 22, 2009 9:11 am

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to Off Topic / Otros temas

Who is online

Users browsing this forum: No registered users and 34 guests