Discussion:
search query on form causes db to crash
(too old to reply)
Alan B.
2009-03-27 14:25:48 UTC
Permalink
Hello,

I have a search utility that I've created. It's activated by a command
button on my form. It allows me to search for specific data in my DB and
then populates the form with that records data. The form is a bound form.

This utility works well in dozens of databases that I have, but all of a
sudden I'm having a problem on one form. When I do the first search it works
perfectly. When I do a second search (without closing the form first) it
crashes the program, and the program closes. If I restart the program, the
same scenario.

Sometimes, if I do a search, then manually use the form's navigation buttons
to go to a different record, and then run a new search, it doesn't crash.

Does anyone have any ideas how to fix this? Compacting and repairing the
database has no effect on it, nor does decompiling, then compacting and
compiling.

Regards,
Alan
Gordon Lincoln
2009-03-29 01:28:05 UTC
Permalink
Hi Alan,

If we assume (very dangerous) that you don't have a coding issue here - then
it has to be corruption, right?

I have had a monster problem where nothing seemed to work - spent a couple
days on it then created a new database, imported the tables and forms one by
one, seeing how various things were working step by step until I hit one
particular form that crashed things.

Painful solution but what worked was doing the imports all over again to
another new database, excepting that one form, then re-creating the
troublesome form from scratch.

That being said - odds are pretty good that some property or bit of code is
whacking you and if you can isolate it - then you won't have to go to the
above extreme.

I might try making a copy of the form, then dumping everything from the copy
except what I had to have to make the search function work and see if it
still breaks. If no, then start restoring bit by bit until it does break, if
it does break, then I'd probably start rebuilding the problem form from
scratch assuming some deep, dark bit has gotten twisted and whenever my code
hits that errant bit - it tries to execute something stupid like jumping to
address 0, or the like.

Hope this helps,
Gordon
Post by Alan B.
Hello,
I have a search utility that I've created. It's activated by a command
button on my form. It allows me to search for specific data in my DB and
then populates the form with that records data. The form is a bound form.
This utility works well in dozens of databases that I have, but all of a
sudden I'm having a problem on one form. When I do the first search it
works perfectly. When I do a second search (without closing the form
first) it crashes the program, and the program closes. If I restart the
program, the same scenario.
Sometimes, if I do a search, then manually use the form's navigation
buttons to go to a different record, and then run a new search, it doesn't
crash.
Does anyone have any ideas how to fix this? Compacting and repairing the
database has no effect on it, nor does decompiling, then compacting and
compiling.
Regards,
Alan
Loading...