Just a thought, but, you might want to use SYS(3050,1,VAL(SYS(3050,1,0))/3) to make sure your app is only using 1/3 of available memory. Otherwise it will hog memory to the point of slowdowns. Also, putting Sleep(0) in your loop may help other needed system processes to run.
>I have a program in VFP 5.0 that builds a sql query for each record it needs to update and then issues that SQL query to an Oracle db on each loop. The pertinent code is (where gnOracleconnection is a definition of the ODBC connection to the database):
>
>num_to_update = reccount()
>for ctr = 1 to num_to_update
>
>
>
>
>** Send the SQL statement to the Oracle database
> returnValue=sqlexec(gnOracleConnection, sqlString)
>
> if returnValue=-1 then &&if sqlexec failed
> errormessage = "The Oracle connection gnConnection value is " + str(gnOracleConnection) + chr(13)
> errormessage = errormessage + "The error number should be " + str(error())+ chr(13)
> errormessage = errormessage + "The error message should be " + message() + chr(13)
> errormessage = errormessage + "The ticket number being updated was " + alltrim(RECORDNUM) + chr(13)
> messagebox(errormessage)
> return
> endif
>
>
> next
>
>The program takes a while to execute in this fashion. Is there anything that could be done to speed it up?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only