(Mike Mitchell)
10/1/2011 2:19:00 PM
On Fri, 30 Sep 2011 12:02:28 +0200, Schmidt <sss@online.de> wrote:
>How are you coming along with your FullText-search?
One problem I've hit in the past few minutes is
NewID = Cnn.UniqueID64
That generates a number that is too large for a VB6 Long (obviously!)
and can't be stored in, say, List1.ItemData.
Isn't there a NewID = Cnn.UniqueID32 ?
I've got round it by:
Function GenerateSeed() As Long
GenerateSeed = (Now - DateSerial(1970, 1, 1)) * 86400
End Function
and then:
Sub AddFiles....
etc etc ........
NewID = GenerateSeed()
Do
Cmd.SetInt32 1, NewID
Cmd.SetText 2, TxtContent
Cmd.Execute
........ etc etc
NewID = NewID + 1
Loop
End Sub
So every time a new block of files are added, it creates a new seed,
then increments NewID within that block.
I did try to fathom the SQLite docs re AutoIncrement, but it's like
trying to understand Einstein... Why the heck did they make RowID a
hidden column?
Anyway, it works! I've got three text files loaded and can search for
any word in any of the files. (Well, I haven't tested it extensively
yet, as it's only been running for the first time in the past ten
minutes, but it's looking quite promising.)
MM