Page 1 of 1

Strange behaviour

Posted: 20.07.2006, 00:19
by zippo
Hi!

It's a long time since I posted a problem here.. :) (It's a good sign for Zeos)

Sooo...

I noticed a strange behaviour since I upgraded Zeos to latest (I did it 1 week ago) version. in the code

Code: Select all

try
  Query.Open;
except
  Query.Open;
end;
The first time it's an error, but if executed again in the except block, it works. This happen to any query in the application that is first called. After this all works OK - Isn't is strange?

Any suggestion would be apreciated,.. :)

Posted: 20.07.2006, 04:57
by Terence
Hmm, that is strange indeed.
The code you posted - is it your code or from zeos lib? that would be most strange!
If not from zeos maybe you already "Opened" your query somewhere else and didn't closed it again, that would maybe result in internal close for first open and "open" for second open - well just a guess.
Can you track the problem more deep? How is dsState before/ after first open/second open. Does this problem also occour for first open after the create statement? Query.Create > Open;?

Posted: 20.07.2006, 07:59
by zippo
The code is from my application, don't worry.. :):):):)

It has never been opened, this code is right after the AfterConnect event of ZConnection. I'll track the problem more precisely and post it here tomorrow (out of office today).