About wxODBC - Mailing list pgadmin-hackers

From Quan Zongliang
Subject About wxODBC
Date
Msg-id 20090217181024.7EEF.4125B4E5@gmail.com
Whole thread Raw
Responses Re: About wxODBC
List pgadmin-hackers
Hi, all

The class wxDb has a method: GetCatalog(const wxChar *userID)
We can use it to retrieve tables' info.

But, this method return a pointer to wxDbInf.
The class wxDbInf has some fields:
    wxChar        catalog[128+1];
    wxChar        schema[128+1];  // typically means owner of table(s)
    int           numTables;      // How many tables does this datasource have
    wxDbTableInf *pTableInf;      // Equals a new wxDbTableInf[numTables];

The problem is that the schema field looks wrong.
When there are multiple schemas in corresponding database,
it is the first one's name(alphabetic).
And the class wxDbTableInf don't include schema-name.

Do you know how to get full table list and their schema?
I had tried some wxWidgets methods, did not found.

If it can't, we have to let user input a SQL statement manually.

And under MS-Windows, we can use ODBC API: SQLTables method to do this.

Thanks.

-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn


pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Feature freeze for 1.10
Next
From: Ashesh Vashi
Date:
Subject: PATCH: EDB: Comments on procedure that contains special characters giving error