================================================================================
//               ZEOS Library Bug Reporting / Bug Fixing Form                 //
================================================================================

Bug ID               : 1224963                      Priority      : 5
Submitted by         : fduenas                      Date Submitted: 2005-06-21 18:42
Quality assurance by : stefanglienke                Closed as of  : 2005-06-22 10:13
Assigned to          : stefanglienke                Closed by     : stefanglienke

--------------------------------------------------------------------------------

Server (and Version) : ADO
ZEOSLib Version      : 6.5.1 alpha
Component/Class      : TZTable

--------------------------------------------------------------------------------

Error Description:

I have detected a little bug at design time when trying
to get the table list when using the TZTable 
component. If i use MySQL it returns the list, but then
using ADO protocol (MDB database) it returns an empty
string.

I have checked uding the TZSQLMetadata and it returns
correctly the table names even using ADO. so i checked
trhe sources of both property editors. i have found
that in method 

TZTableNamePropertyEditor.GetValueList(List: TStrings);
(this is TZTable's TableName property editor) when
retreiving the Table List using the Metadata.Gettables
method, it conditions only to browse 'TABLE and 'VIEW'
table types. maybe with mysql and other databases it
functions, but with ado this kinf od tables are not
recognized with this names.

this is the code:

------------------------------
TableTypes[0] := 'TABLE';
TableTypes[1] := 'VIEW';
with Metadata.GetTables('', '', '', TableTypes) do
try
while Next do
if GetString(2) = '' then
List.Append(GetString(3))
else
List.Append(GetString(2) + '.' + GetString(3));
finally
Close;
end;
-----------------------------

In TZTableNameProperty.GetValueList(List: TStrings);
(TZSqlMetadata property editor)

this kind of filter doesn't exists. this is the code.
------------------------------------
ResultSet := Metadata.GetTables(Catalog, Schema, '', nil);
----------------------------------

So i think the table types has something to do with
this bug. 

Also i think istead of using GetString(3) maybe it is
better to use GetStringByName('TABLE_NAME')

--------------------------------------------------------------------------------

Actions done form Bugfixing:

Changed Property Editors and deleted the old versions

- property editor for TableName works with Metadata and Table
- property editor for StoredProcName works with Metadata and StoredProc


================================================================================


