Page 1 of 1

"connected" always returns -1 and about DBComboBox

Posted: 11.03.2008, 07:26
by Yoshio
I have 2 questions:

1 - I'm trying this to connect:
ZConnection1.connected := True;
or
ZConnection1.connect;

In the 2 ways ZConnection.connected and always returns -1, but the sqls is working and returning values, is it normal?

------------------------------------------------------
2 - I would like to use a DBComboBox to list some values from a table. But isn't work, DBComboBox just display the first value. Can zeos work with DBComboBox or is my code wrong?

My configs:
Delphi7
Oracle 10g
Zeos 6.6.2-RC
Form has: TZConnection with protocol oracle9i --> TZTable --> TDataSource --> TDBComboBox.

Posted: 11.03.2008, 10:18
by mdaems
Concerning your first question :

Delphi help says :
A value of type ByteBool, LongBool, or WordBool is considered True when its ordinality is nonzero. If such a value appears in a context where a Boolean is expected, the compiler automatically converts any value of nonzero ordinality to True.
So your boolean result of -1 should mean true. SQL's work like expected in such a situation. To check if this answer is correct : just change the pasword you use to connect and the return value should be 0.

Concerning the Combobox question: Zeoslib queries are normal TDatasets, so all components working with the standard query components should also work wth Zeoslib. I have no experience with DBComboBox myself, so I leave the deatils to somebody else. Good luck!

Mark