"connected" always returns -1 and about DBComboBox

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Yoshio
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 11.03.2008, 06:05
Location: Japan
Contact:

"connected" always returns -1 and about DBComboBox

Post 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.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Post Reply