I know, it's a mess... I have a persistence framework that supports DB2, Oracle, MySQL, SQLServer and Interbase and it's a nightmare whenever you try to do anything related to catalogs... And planning to integrate PostgreSQL as well... In case you wanna try to implement that stuff differently by calling the ODBC function, have a look at : http://msdn.microsoft.com/en-us/library/ms711831%28VS.85%29.aspx Caution: since you're in Linux, I'd also check iODBC (or whatever you use) for the same API... just in case they would differ (most likely!). This might be a simpler way to accomplish what you need... For Oracle, you might wanna query against the DICTIONARY view to get the same information... Hope this helps. ----------------- Benoit St-Jean Yahoo! Messenger: bstjean Blog: lamneth.wordpress.com A standpoint is an intellectual horizon of radius zero. (Albert Einstein) ________________________________ From: "Schwab,Wilhelm K" <bschwab@anest.ufl.edu> To: Benoit St-Jean <bstjean@yahoo.com> Sent: Tuesday, September 1, 2009 2:14:06 PM Subject: RE: [Pharo-project] ODBC: table names and column names/types? It might be helpful. Something similar works for the columns, but getting it to work with a where clause seems to be needlessly fragile. I have code that generates SQL that works just about anywhere, but not with the SQL server information schema. Given MS' involvement, I can't help but think that they might be using a different query engine or something equally stupid. I have also seen documention suggesting that this will not work with Oracle, which is also on my list. Still, this might provide a nice shortcut to the ODBC schema functions. Thanks, Bill ________________________________ From: Benoit St-Jean [mailto:bstjean@yahoo.com] Sent: Tuesday, September 01, 2009 12:15 PM To: Schwab,Wilhelm K Cc: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] ODBC: table names and column names/types? To get a list of tables for SQL Server (or even MySQL 5.x): SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES Hope this helps... ----------------- Benoit St-Jean Yahoo! Messenger: bstjean Blog: lamneth.wordpress.com A standpoint is an intellectual horizon of radius zero. (Albert Einstein) ________________________________ From: "Schwab,Wilhelm K" <bschwab@anest.ufl.edu> To: Benoit St-Jean <bstjean@yahoo.com> Sent: Tuesday, September 1, 2009 9:59:06 AM Subject: RE: [Pharo-project] ODBC: table names and column names/types? That is very interesting. Where there is immediate need, 5.x is installed. Thinking about this some more, the mix of clients and servers is more like: Clients: windows, linux Servers: SQL server on Windows MySQL on Windows and Linux .mdb file (mostly migrated to MySQL) Is there a similar schema trick on SQL server? However, I just gave myself query access to the MySQL schema, and would not have such control over the SQL server. It might pay for me to write the code to read the schema via ODBC functions. Bill ________________________________ From: Benoit St-Jean [mailto:bstjean@yahoo.com] Sent: Tuesday, September 01, 2009 8:11 AM To: Pharo-project@lists.gforge.inria.fr Cc: Schwab,Wilhelm K Subject: Re: [Pharo-project] ODBC: table names and column names/types? Which version of MySQL? Since version 4.1, there's all you need in the "INFORMATION_SCHEMA" database, in the "TABLES" table. But because of some bug in 4.1, query against that database sometimes caused the server to crash. I'd recommend that method only for 5.x and upwards. ----------------- Benoit St-Jean Yahoo! Messenger: bstjean Blog: lamneth.wordpress.com A standpoint is an intellectual horizon of radius zero. (Albert Einstein) ________________________________ From: "Schwab,Wilhelm K" <bschwab@anest.ufl.edu> To: "Pharo-project@lists.gforge.inria.fr" <Pharo-project@lists.gforge.inria.fr> Sent: Tuesday, September 1, 2009 6:58:49 AM Subject: Re: [Pharo-project] ODBC: table names and column names/types? Primarily MySQL running on Windows (Linux as soon as reasonable to do so) accessed from both Windows and Linux. There will also be the occaisional .mdb file. ________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Mariano Martinez Peck Sent: Tuesday, September 01, 2009 3:18 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] ODBC: table names and column names/types? On Mon, Aug 31, 2009 at 10:00 PM, Schwab,Wilhelm K <bschwab@anest.ufl.edu> wrote: I
looked through it in MC, but did not see anything obvious. Even then, I doubt it is a workable choice for me because regardles of what X and - mean in their doumention, one of the DBMS/OS pairs I need is not supported.
Hi Bill! Which is the combination of your RDBMS / OS ? Regards from the ESUG :) Mariano
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr > [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Esteban A. Maringolo Sent: Monday, August 31, 2009 6:38 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] ODBC: table names and column names/types?
Hello Bill,
2009/8/31 Schwab,Wilhelm K <bschwab@anest.ufl.edu>:
Hello all,
Is there anything available for Pharo that gives
schema information about a database?
Doesn't SqueakDBX do that?
Regards,
Esteban A. Maringolo
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
________________________________ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! ________________________________ Looking for the perfect gift?Give the gift of Flickr! __________________________________________________________________ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/