Hello all,
Is there anything available for Pharo that gives schema information about a database? Bill _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Hello Bill,
2009/8/31 Schwab,Wilhelm K <[hidden email]>: > 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 [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
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.
-----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Esteban A. Maringolo Sent: Monday, August 31, 2009 6:38 PM To: [hidden email] Subject: Re: [Pharo-project] ODBC: table names and column names/types? Hello Bill, 2009/8/31 Schwab,Wilhelm K <[hidden email]>: > 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 [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On Mon, Aug 31, 2009 at 10:00 PM, Schwab,Wilhelm K <[hidden email]> 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
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
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: [hidden email] [mailto:[hidden email]] On Behalf Of Mariano Martinez Peck Sent: Tuesday, September 01, 2009 3:18 AM To: [hidden email] Subject: Re: [Pharo-project] ODBC: table names and column names/types? On Mon, Aug 31, 2009 at 10:00 PM, Schwab,Wilhelm K <[hidden email]>
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
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Schwab,Wilhelm K
Hi, If I recall correctly, nothing was implemented in regards to getting a list of tables. But implementing a method calling the ODBC SQLTables function to get such a list shouldn't be so hard. But normally, you can get the same result by executing a SQL statement querying the catalog of the RDBMS. Which database are you using ? 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" <[hidden email]> To: "[hidden email]" <[hidden email]> Sent: Monday, August 31, 2009 9:00:05 PM Subject: Re: [Pharo-project] ODBC: table names and column names/types? 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. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Esteban A. Maringolo Sent: Monday, August 31, 2009 6:38 PM To: [hidden email] Subject: Re: [Pharo-project] ODBC: table names and column names/types? Hello Bill, 2009/8/31 Schwab,Wilhelm K <[hidden email]>: > 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 [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Schwab,Wilhelm K
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" <[hidden email]> To: "[hidden email]" <[hidden email]> 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: [hidden email] [mailto:[hidden email]] On Behalf Of Mariano Martinez Peck Sent: Tuesday, September 01, 2009 3:18 AM To: [hidden email] Subject: Re: [Pharo-project] ODBC: table names and column names/types? On Mon, Aug 31, 2009 at 10:00 PM, Schwab,Wilhelm K <[hidden email]>
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
Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
You can use the native MySQL driver if you want to do what Benoit St-Jean said. SqueakDBX with MySQL doesn't work yet under Windows, but there is a lot of people asking about that, so I think we must get MySQL another round :(
Is somewhere a C (under Windows) guru here? Because the problem is: I can compile OpenDBX with the MySQL client library in Windows but in runtime, when I try to run the OpenDBX tests, I have a crash :( And In windows I cannot see even the stack...If there is someone capable to help me, please send me a private email. I will really appreciate the help. Best, Mariano 2009/9/1 Benoit St-Jean <[hidden email]>
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Well, no need to use a native driver for that. A simple "standard" SQL statement issued through an ODBC connection against the INFORMATION_SCHEMA.TABLES table would do the job. Benoit St-Jean Yahoo! Messenger: bstjean Blog: lamneth.wordpress.com A standpoint is an intellectual horizon of radius zero. (Albert Einstein) From: Mariano Martinez Peck <[hidden email]> To: [hidden email] Sent: Tuesday, September 1, 2009 9:23:23 AM Subject: Re: [Pharo-project] ODBC: table names and column names/types? You can use the native MySQL driver if you want to do what Benoit St-Jean said. SqueakDBX with MySQL doesn't work yet under Windows, but there is a lot of people asking about that, so I think we must get MySQL another round :( Is somewhere a C (under Windows) guru here? Because the problem is: I can compile OpenDBX with the MySQL client library in Windows but in runtime, when I try to run the OpenDBX tests, I have a crash :( And In windows I cannot see even the stack...If there is someone capable to help me, please send me a private email. I will really appreciate the help. Best, Mariano 2009/9/1 Benoit St-Jean <[hidden email]>
Reclaim your name @ymail.com or @rocketmail.com. Get your new email address now! _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On Tue, Sep 1, 2009 at 10:51 AM, Benoit St-Jean <[hidden email]> wrote:
But he is ALSO in Linux....and ODBC and Linux are not good friends. In addition I don't know if the ODBC Squeak driver supports Linux, because the FFI calls are different (apicall instead of cdelc).
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Benoit St-Jean
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" <[hidden email]> To: Benoit St-Jean <[hidden email]> 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:[hidden email]] Sent: Tuesday, September 01, 2009 8:11 AM To: [hidden email] 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" <[hidden email]> To: "[hidden email]" <[hidden email]> 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: [hidden email] [mailto:[hidden email]] On Behalf Of Mariano Martinez Peck Sent: Tuesday, September 01, 2009 3:18 AM To: [hidden email] Subject: Re: [Pharo-project] ODBC: table names and column names/types? On Mon, Aug 31, 2009 at 10:00 PM, Schwab,Wilhelm K <[hidden email]>
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
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! _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
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" <[hidden email]> To: Benoit St-Jean <[hidden email]> 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:[hidden email]] Sent: Tuesday, September 01, 2009 12:15 PM To: Schwab,Wilhelm K Cc: [hidden email] 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" <[hidden email]> To: Benoit St-Jean <[hidden email]> 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:[hidden email]] Sent: Tuesday, September 01, 2009 8:11 AM To: [hidden email] 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" <[hidden email]> To: "[hidden email]" <[hidden email]> 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: [hidden email] [mailto:[hidden email]] On Behalf Of Mariano Martinez Peck Sent: Tuesday, September 01, 2009 3:18 AM To: [hidden email] Subject: Re: [Pharo-project] ODBC: table names and column names/types? On Mon, Aug 31, 2009 at 10:00 PM, Schwab,Wilhelm K <[hidden email]>
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
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! Looking for the perfect gift? Give the gift of Flickr! _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Schwab,Wilhelm K
On Mon, Aug 31, 2009 at 10:00 PM, Schwab,Wilhelm K <[hidden email]> 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. OpenDBX supports now MySQL under Windows. I couldn't test SqueakDBX because I have a problem with the MySQL I have installed in my windows PC, but OpenDBX was tested and worked perfect. I will fix my MySQL in Windows so that I can test it, but if you want to also try to test it, you can do it. It is quite easy: 1) Download DLLs from here: http://linuxnetworks.de/opendbx/download/opendbx-1.4.3_win32.zip 2) Copy libopendbx-1.dll and libmysqlbackend-1.dll to c:/windows/system32/ 3) Install your MySQL client libraries. If the database is in other PC, you can install the client libraries: For building the OpenDBX MySQL backend, you need to install the "Windows Essentials" available in the download section of the MySQL website. A minimal install must consist of Client Programs -> MySQL Command Line Utilities Otherwise, the libmysql.dll file isn't installed in the "bin\" directory and the files in the "include\" and "lib\opt\" directory are not available. If you have the database installed, I think you also have the client, but I am not sure.THE IMPORTANT thing is that the MySQL libraries (dlls) are findable by windows (put it in the same directory of the executable, in path or whatever windows can do) If I could test it, I will let you know. If you do it, please let me know ;) Best, Mariano
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |