Freature requests from users for ZeosLib's DBOs
Moderators: gto , cipto_kh , EgonHugeist , mdaems
simpsomboy
Fresh Boarder
Posts: 6 Joined: 14.09.2005, 06:05
Post
by simpsomboy » 07.03.2007, 22:51
Your ZeosLib DBO Version: 6.6.1
The IDE you are using: Delphi
Version (and maybe patchlevel) of the IDE: 7
The database you are using: Firebird
Version of the database: 1.5
Used protocol: firebird-1.5
[hr]
Error description and post
I sugest you to put a function to get the fieldnames directly from connection
like gettablenames
somethin like this
TZConnection....
interface
Code: Select all
public
procedure GetFieldNames(const TablePattern: string; List: TStrings);
implementation
Code: Select all
procedure TZConnection.GetFieldNames(const TablePattern: string; List: TStrings);
var
Metadata: IZDatabaseMetadata;
ResultSet: IZResultSet;
begin
CheckConnected;
List.Clear;
Metadata := DbcConnection.GetMetadata;
ResultSet := Metadata.GetColumns('', '', TablePattern, '');
while ResultSet.Next do
List.Add(ResultSet.GetStringByName('COLUMN_NAME'));
end;
mdaems
Zeos Project Manager
Posts: 2766 Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:
Post
by mdaems » 30.04.2007, 14:24
Hi,
I added this feature with some small modification : I included the column name pattern as a parameter. Renamed to GetColumnNames.
SVN Testing branch revision 241.
Mark
simpsomboy
Fresh Boarder
Posts: 6 Joined: 14.09.2005, 06:05
Post
by simpsomboy » 30.05.2007, 22:31
Hi,
thank you for adding this code
it's very useful, and people doesn't need to patch their code anymore
Alexandre
edrobinson
Fresh Boarder
Posts: 6 Joined: 06.12.2006, 20:59
Post
by edrobinson » 25.10.2007, 18:29
Hi,
I tried to use this method today after getting SVN 241.
The call: dbMySQL.GetColumnNames(TableName,'',qFields);
raises an exception "Column with name "Field" was not found."
Any thoughts?
mdaems
Zeos Project Manager
Posts: 2766 Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:
Post
by mdaems » 25.10.2007, 19:13
Which Mysql version?
Mark
edrobinson
Fresh Boarder
Posts: 6 Joined: 06.12.2006, 20:59
Post
by edrobinson » 25.10.2007, 19:23
That was the problem. I was using an old MySQL dll. changed to 4.x and all is well.
Thanks for the quicl reply.
mdaems
Zeos Project Manager
Posts: 2766 Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:
Post
by mdaems » 25.10.2007, 19:30
Weird... I was talking about the server version... Apparently the dll also does something with the 'show columns' queries.
Anyway, now we know how to solve this.
Mark