[AccessD] overflow

Gustav Brock gustav at cactus.dk
Sat Dec 23 17:16:05 CST 2006


Hi Pedro

You could read in the memo field in chunks of 32K until a match or the last chunk is read.
That should be fine, if all you need is to display a match. If you wish to edit the text, the plot thickens ...
/gustav


>>> pedro at plex.nl 24-12-06 0:00 >>>
Hello Gustav,

i didn't know that.
Can i use something else for this, or work around.
Otherwise i have to use an other search function.

Pedro



----- Original Message ----- 
From: "Gustav Brock" <gustav at cactus.dk>
To: <accessd at databaseadvisors.com>
Sent: Saturday, December 23, 2006 11:47 PM
Subject: Re: [AccessD] overflow


> Hi Pedro
>
> The value of SelStart itself is limited to the max. positive value of an 
> Integer.
>
> /gustav
>
>>>> pedro at plex.nl 23-12-06 22:49 >>>
> Hello Group,
>
> when using the search function below and when the position of the word 
> that is used in the search-string in field "Plaats" is above 32,767 
> (memofield), i get an runtime error 6, overflow .
> I changed in the code: "Dim plaats As Integer" to "Dim plaats As Long", 
> but still have the same error. I don't understand why?
>
> Pedro Janssen
>
>
>
> ------------------code-------------------------------
> Option Compare Database
> Dim plaats As Integer
>
> Private Sub Knop21_Click()
>
>   If dummy <> "" Then
>      tekstplaats = plaats
>      If tekstplaats = 0 Then
>         tekstplaats = 1
>      End If
>      INHOUD.SetFocus
>
>      plaats = INHOUD.SelStart + Len(dummy) + 1
>      plaats = InStr(tekstplaats + 1, INHOUD, dummy, 1)
>      If plaats <> 0 Then
>         INHOUD.SelStart = plaats - 1
>         INHOUD.SelLength = Len(dummy)
>      Else
>         INHOUD.SelStart = 0
>         INHOUD.SelLength = 0
>      End If
>      tekstplaats = plaats
>   Else
>      MsgBox "Kan geen lege tekst zoeken !!", 16, "Tekst zoeken"
>   End If
>
> End Sub
>
> ------------------/code--------------------------
> -- 



More information about the AccessD mailing list