Click here to get back home

Catalog() in Win32::ODBC for MySQL

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Catalog() in Win32::ODBC for MySQL dmittleider 08-27-2006
Posted by dmittleider on August 27, 2006, 1:58 am
Please log in for more thread options


I'm trying to pull the table information from MySQL using the Catalog()
method and it gives me errors...

Here's an example of my code:
-----------------------------------------------------------------------------
use Win32::ODBC;
my($db) = new Win32::ODBC("dsn=mysqldb;uid=user;pwd=pass");

if( $db->Catalog( '', '', '', "'TABLE','SYSTEM TABLE'" ) )
{
my %Data;
print "Available tables:\n";
while( $db->FetchRow( %Data ) )
{
print "\t" . $Data . "\n";
#print "[";
}
}
$db->Close();
-----------------------------------------------------------------------------

This DSN maps to a database that has just one table in it. When I run
this it gives me an error in ODBC.pm "Use of uninitialized value in
numeric ne (!=) at C:/Perl/site/lib/Win32/ODBC.pm line 291." which I
think is just because it doesn't grab any results from the database.

If I use the db->TableList that works, but I need the schema
information. I don't want to resort to running SQL statements against
the system tables or using any list tables type of statements because
eventually I want to make this portable enough to run on an Oracle
database too so I'm trying to stick to built-in Win32::ODBC methods.

Any ideas anybody?


Posted by Dr.Ruud on August 27, 2006, 8:51 am
Please log in for more thread options


dmittleider@gmail.com schreef:
> I'm trying to pull

Don't multipost. You could have crossposted, with the followup-to set to
the fittest group, but that is also not the best way to get answers.
Cancel your messages and try again.

--
Affijn, Ruud (September is nigh)

"Gewoon is een tijger."



Similar ThreadsPosted
Dave Roth's site (Win32::AdminMisc, Win32::ODBC, etc.) not available. December 22, 2005, 8:46 am
win32::odbc October 3, 2005, 2:04 pm
Where to ask questions about Win32::ODBC? July 14, 2004, 9:36 am
Alternate option to win32::ODBC July 19, 2007, 2:44 pm
Alternate option to win32::ODBC July 19, 2007, 3:17 pm
Win32::ODBC Find Primary Key Column February 6, 2005, 8:21 pm
Do Win32::ODBC module support Chinese characters when used with MS Access? September 15, 2004, 10:33 pm
XP, Perl, Win32::ODBC, Microsoft Access 2002 SP3, & Chinese characters January 22, 2008, 4:18 pm
DBD::mysql test errors on Win32 September 2, 2005, 2:54 pm
[RESOLVED] DBD::mysql unresolved symbol _intel_fast_memcpy & mysql-standard-5.0.22-linux-i686-icc-glibc23 August 29, 2006, 6:33 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap