[VCOM] VB6 Querying table after many inserts, fails in
multiple ways
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Aug 26 14:27:25 CDT 2003
on 8/25/03 3:53 PM, rbundock at bluementor.com at rbundock at bluementor.com
wrote:
> Hi
>
> Im trying to transfer a DBase5 database into Valentina via VB6. Im
> typically looping through the DBase5 tables and executing insert statements
> against Valentina. My first challenge was that after 1137 records this
> statement would error with 'Field not found':
>
> ...
> Set rstCheck = objVDatabase.SqlSelect("SELECT RecID FROM words WHERE word
> = '" & strIWord & "'")
> GetWordID = CLng(rstCheck.Field(1).Value)
> ...
>
> I discovered that if I trapped this and then tried the query a different
> way, it would continue to work:
>
> ...
> Set rstCheck = objVDatabase.SqlSelect("SELECT RecID FROM words WHERE word
> = '" & strIWord & "'")
> If rstCheck.FieldCount > 0 Then
^^^^^^^^^^^^^^^^^^^^^ I think here db.errcode must have something
> GetWordID = CLng(rstCheck.Field(1).Value)
> Else
> ' Try query different way
> Set rstCheck = objVDatabase.SqlSelect("SELECT RecID FROM words WHERE
> word LIKE '\A" & strIWord & "'")
> GetWordID = CLng(rstCheck.Field(1).Value)
> End If
> ...
>
> Only certain values of strIWord would give this problem (eg. 'UNION').
> However, now after 13650 records instead of rstCheck not containing any
> fields it simply becomes unstable and errors with 'Object not referenced'.
> Ive tried closing and re-opening the database, using Flush and the SQL
> 'DEFRAGMENT' and 'COMPACT'. The database is left in a damaged state.
Hi Rich,
1) I did try reproduce and all works fine for me.
I have try in viSQL utility query as WHERE fld = 'UNION'
And no problems.
So I need from you some small project or db that reproduce this.
2) what version of VCOM you use?
3) can you in viSQL again your Valentina db try that query with UNION ?
If you can reproduce then I need only that db.
4) you say e.g. UNION.
What else ?
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list