>Hi All,
>
>I am having a problem with my cursorfill for my cursoradapter, or just after it.
>
>If the user wanted to see the data collected in a VFP table, after the cursorfill is done, I have to create a database container, because the data coming from SQL Server could be longer then VFP free tables allow. I then do a copy to (thetablename) database (thetablename + "dbc") to put the data into the VFP table. It is at this point that I get a file in use error throw. I can see that the record number on the cursor is going up. Is there a way to make VFP stop and wait until the cursor is totally filled, so that I do not get this error?
>
>Here is my code:
>
> IF loCursor.CURSORFILL (.F., .F., 0, loCommand)
> cCursorMade = cTable_name
> SELECT &cTable_name.
> IF(cOutput_type = "VFP_DBF") THEN
> LOCAL lcSafety, lcOutputFileName
> STORE "" TO lcSafety, lcOutputFileName
> lcSafety = SET("Safety")
> lcOutputFileName = IIF(AT(".", cOutputFileName) > 0, ;
> LEFT(cOutputFileName, AT(".", cOutputFileName) - 1), ;
> cOutputFileName)
> SET SAFETY OFF
> llok = deletedbffiles(cOutputFileName)
> CREATE DATABASE (lcOutputFileName + "dbc")
> COPY TO ALLTRIM(lcOutputFileName) DATABASE (lcOutputFileName + "dbc") <-- this is where it errors
> SET SAFETY &lcSafety.
> ENDIF
> ELSE
>
>
>TIA
>Beth
What are values of
loCursor.FetchSize?
loCursor.MaxRecords?
If they are different that -1 make both of them to -1
loCursor.FetchSize = -1
loCursor.MaxRecords = -1
IF loCursor.CURSORFILL (.F., .F., 0, loCommand)
....
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.