![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 11 total |
![]() |
Tue, Jun 26 2007 4:48 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Can anyone think of a reason why "if EMails.FindKey([MailBox]) then" fails whilst" EMails.SetRange([MailBox],[MailBox]);" returns the right result?
Roy Lambert |
Tue, Jun 26 2007 10:30 AM | Permanent Link |
Dave Harrison | Roy Lambert wrote:
> Can anyone think of a reason why "if EMails.FindKey([MailBox]) then" fails whilst" EMails.SetRange([MailBox],[MailBox]);" returns the right result? > > Roy Lambert Roy, Are there blanks at the end of the field? Case sensitivity? Corrupted index? Is it a compound index? Dave |
Tue, Jun 26 2007 11:25 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Dave
Good guesses. I should have said - single integer field index. Roy Lambert |
Tue, Jun 26 2007 11:57 AM | Permanent Link |
Dave Harrison | Roy Lambert wrote:
> Dave > > > Good guesses. I should have said - single integer field index. > > Roy Lambert > Roy, I'd rebuild the index if you haven't already done so. If it is a simple integer index, the Range and FindKey should both work, even if the index was descending. Did you try it from dbSys? If all else fails, this looks like "A JOB FOR SUPER TIM!!". ![]() Dave |
Tue, Jun 26 2007 1:09 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< Can anyone think of a reason why "if EMails.FindKey([MailBox]) then" fails whilst" EMails.SetRange([MailBox],[MailBox]);" returns the right result? >> Most likely, corruption. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 27 2007 4:10 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Dave/Tim
Just remembered one of the other things I tried - I checked that MailBox was indeed integer, and help the correct value - YES to both, I then substituted a literal 2 for MailBox in the FindKey and it worked. Why I don't know. Anyway I'm going with SetRange since that also removes a need to test that the field is equal to MailBox in the loop and will therefore be a bit (probably undetectable) faster. Roy Lambert |
Thu, Jun 28 2007 11:53 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roy,
<< Just remembered one of the other things I tried - I checked that MailBox was indeed integer, and help the correct value - YES to both, I then substituted a literal 2 for MailBox in the FindKey and it worked. Why I don't know. >> You do know that there is absolutely no way that those two statements are both true, right ? ![]() -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jun 28 2007 1:42 PM | Permanent Link |
Roy Lambert NLH Associates ![]() | Tim
><< Just remembered one of the other things I tried - I checked that MailBox >was indeed integer, and help the correct value - YES to both, I then >substituted a literal 2 for MailBox in the FindKey and it worked. Why I >don't know. >> > >You do know that there is absolutely no way that those two statements are >both true, right ? ![]() I suspect so, but my eyeballs assured me otherwise <bigger g> Roy Lambert |
Thu, Jun 28 2007 3:56 PM | Permanent Link |
Dave Harrison | Roy Lambert wrote:
> Tim > > >><< Just remembered one of the other things I tried - I checked that MailBox >>was indeed integer, and help the correct value - YES to both, I then >>substituted a literal 2 for MailBox in the FindKey and it worked. Why I >>don't know. >> >> >>You do know that there is absolutely no way that those two statements are >>both true, right ? ![]() > > > I suspect so, but my eyeballs assured me otherwise <bigger g> > > Roy Lambert > Roy, Looks like a conversion problem? Maybe it is trying to convert integer to something else? I'm thinking maybe the table definition is screwed up? A couple of ideas: 1) Try copying the table to a new table using dbSys and see if it works on the new table. 2) Unload the table schema to SQL and look at it under a magnifying glass. (Post it here if you like) 3) Take 2 aspirin (or 2 shots of Wild Turkey-your choice) and get some sleep. Things will look better in the morning. ![]() Dave |
Fri, Jun 29 2007 2:59 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Dave
Thanks for the suggestions, but since SetRange works, and is actually better I'm ignoring the horror. Roy Lambert |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |