strange error afty deletion or insert with sql queries


2004-09-12 03:59:36 AM
cppbuilder9
Hi,
I'm confronteted with a phenomenum, I don't understand.
I am using c++-Builder prof., a Yard-Database on a network-server and
the Yard-odbc-driver.
I have a lot of TQuerys on my form, two of them with TDBSQL-Updates. All
of those are connected to the same database but the querys read and
write all _different_ tables.
One of those tables establishes a connection between two others. There
is no referential itegrity neighter deletion-cascade established.
This construct works quite well, but when I delete a record in the
connection-table oder I insert a new one, afterwards something strange
happens:
When I simply click on an TDBLookupComboBox to open it up, I get an
"invalid cursor state error". But this TDBLookup is connected to another
query that looks at another table. The lookup-box has only a
list-source, no data-source.
As a workaround, I deactivate and reactivate all the _non_involved_
querys after the insert oder delete operations. Thats solves the
problem, but it still looks strange to me. In the moment, there are not
many records in the database, but the closing/reopening might soon cause
a slowdown
Can anyone give me a clue, what might be the reason for this strange
error? Is there a better solution to avoid the problem?
Thanks in advance
Michael Kutscher