[V4RB] Bug in UPDATE or ImportText or Flush?

Richard Altenburg valentina at brainchild.nl
Sun Mar 23 09:07:05 CST 2003


On 23-03-2003 08:51, "Richard Altenburg" <valentina at brainchild.nl> wrote:

> vcsImportGroup=New VCursor(ppPiPaBase, "SELECT groupname FROM AvailableGroup
> WHERE RecID=0")
>       
> If (vcsImportGroup<>Nil) Then
>         
>  ppPiPaBase.ppAvailableGroup.Groupname.Indexed=False
>         
>  vcsImportGroup.ImportText(fdiTemp, " ", (Chr(13)+Chr(10)))
>         
>  ppPiPaBase.ppAvailableGroup.Groupname.Indexed=True
>         
>  ppPiPaBase.Flush
>         
>  rowsAffected=ppPiPaBase.SqlExecute("UPDATE AvailableGroup SET
> server_recid="+Format(serverIDInPopUpMenu, "############")+" WHERE
> server_recid=0")
>         
>  ppPiPaBase.Flush
>         
>  vcsImportGroup=Nil
> 

I did some more tests and just cannot pinpoint the problem.

Tests included removal of index setting (though setting the index to off
speeds up the import), and I also tried all without the flushing.

Sometimes it just works, whatever I remove, and sometimes nothing works.
Especially on an empty database, I cannot get it to work, whatever I try.

After importing some 200,000 groupnames, things get better and it does not
matter what I remove (indexing on/off, flushing), it just seems to work in
most cases.

This is not easy to solve for me on my own, because it is so hard to
reproduce (though the first importing never works, the data is there, but
the pointer to the Server-table, or rather, from the Server-table to the
AvailableGroup-table, is just not working).



More information about the Valentina mailing list