Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 10 total |
Problem with Append (Dbisam4.24/D7) |
Fri, Mar 19 2010 10:27 PM | Permanent Link |
marcioehrlich | I have a DBIsam table that when is empty, if I call a TabTrab.Append, it
raises an EListError, index out of bounds (-1). But if I insert a record using DBSys, my application will run normally a new Append. Then, if I delete this record and the table becomes empty again, the Append raises once more the same error. That never happened to me, I can see no sense in that and I'm totally lost. Any hint will be appreciated, please. Marcio |
Sat, Mar 20 2010 5:00 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Marcio
If its OK in DBSys but not your app it suggests some additional code in your app. I'd check out calculated fields and linked events, probably the latter where a field is being used to do a .Find or .IndexOf and since its null returning -1 Roy Lambert [Team Elevate] |
Sat, Mar 20 2010 7:19 AM | Permanent Link |
marcioehrlich | How can I step debug that? The error is raised at the very Append line.
M. "Roy Lambert" <roy.lambert@skynet.co.uk> escreveu na mensagem news:EBBE3196-6B55-4D82-ADDB-6F214CE35EF0@news.elevatesoft.com... > Marcio > > > If its OK in DBSys but not your app it suggests some additional code in > your app. I'd check out calculated fields and linked events, probably the > latter where a field is being used to do a .Find or .IndexOf and since its > null returning -1 > > Roy Lambert [Team Elevate] > |
Sat, Mar 20 2010 8:21 AM | Permanent Link |
Robert Kaplan | "marcioehrlich" <no@no.com> wrote in message news:274FC8FA-DEB6-41C2-91D0-3CCE3BFE73F9@news.elevatesoft.com... > How can I step debug that? The error is raised at the very Append line. > Does an insert also raise the error? Robert |
Sat, Mar 20 2010 8:47 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | marcioehrlich
>How can I step debug that? The error is raised at the very Append line. The hard way Firstly just eyeball all of the events that use any events that use fields of that table. Quite often its obvious where the problem is. If that doesn't work my next step is to set a breakpoint on all lines of code in the unit. If that doesn't work I start disconnecting things until the error goes away and then have a look at the last thing I disconnected. Roy Lambert [Team Elevate] |
Sat, Mar 20 2010 9:40 AM | Permanent Link |
Rita Tipton | Append adds a record after the last record
in the table but the index is showing -1 records but append should act as insert in that case. As Robert said try an insert instead of the append my guess is it will work. HTH Rita "marcioehrlich" <no@no.com> wrote in message news:274FC8FA-DEB6-41C2-91D0-3CCE3BFE73F9@news.elevatesoft.com... > How can I step debug that? The error is raised at the very Append line. > > M. > > "Roy Lambert" <roy.lambert@skynet.co.uk> escreveu na mensagem > news:EBBE3196-6B55-4D82-ADDB-6F214CE35EF0@news.elevatesoft.com... >> Marcio >> >> >> If its OK in DBSys but not your app it suggests some additional code in >> your app. I'd check out calculated fields and linked events, probably the >> latter where a field is being used to do a .Find or .IndexOf and since >> its null returning -1 >> >> Roy Lambert [Team Elevate] >> > > |
Sat, Mar 20 2010 12:22 PM | Permanent Link |
marcioehrlich | Insert does not raises it, but it seems it forces me to fill required
fields, while the table append just allow empty fields for the dbedits to get input from the user. Is there a way to overcome this? M. "Robert" <ngsemail2005withoutthis@yahoo.com.ar> escreveu > Does an insert also raise the error? > > Robert |
Sat, Mar 20 2010 1:01 PM | Permanent Link |
marcioehrlich | I found out that even before the append the table was already in dsInsert
state. So I tried: If TabTrab.State <> dsInsert then TabTrab.Append; No more error! I must confess I'm not quite aware of why, but I left the code like that! Anyway, many thanks for your inputs, that helped me to think more about it. Marcio |
Sat, Mar 20 2010 1:26 PM | Permanent Link |
marcioehrlich | I tested TabTrab.Insert and got the same error.
M.E. "Robert" <ngsemail2005withoutthis@yahoo.com.ar> escreveu > > Does an insert also raise the error? > Robert |
Sun, Mar 21 2010 9:36 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | marcioehrlich
>I found out that even before the append the table was already in dsInsert >state. >So I tried: > >If TabTrab.State <> dsInsert then > TabTrab.Append; > >No more error! > >I must confess I'm not quite aware of why, but I left the code like that! > Don't just leave it. There must be some logic error in your code if you can try and insert (or append) into a table that's already in insert mode. At some point it will resurface. Roy Lambert |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |