Hi Folks Scott R. Godin, in a post on 2003/10/18, had this code: my $sth = $dbh1->column_info( undef, undef, $table, '%'); so I've tried a few similar things...
1) I tried: my($column_sth) = $dbh -> column_info(undef, undef, $table_name, '%'); and got: Undefined subroutine &DBD::mysql::db::SQL_VARCHAR called at C:/Perl/site/lib//DBD/mysql.pm line 337. (I was wrong in my previous post that this error comes from calling data_sources). 2) I tried: my($column_sth) = $dbh -> column_info(undef, '', $table_name, '%'); and got: DBD::mysql::db column_info failed: No Database Selected at C:/Perl/site/lib//Local/Application.pm line 969 3) I tried: my($column_sth) = $dbh -> column_info('', undef, $table_name, '%'); and got: (same error as (2) ) 4) I tried: my($column_sth) = $dbh -> column_info('', '', $table_name, '%'); and got: DBD::mysql::db column_info failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '.`user_type`' at line 1 at C:/Perl/site/lib//Local/Application.pm line 971. (`user_type` is the name of the table being tested). 5) I tried: my($column_sth) = $dbh -> column_info('%', '%', $table_name, '%'); and got: (same error as (4) ) 6) I tired: my($column_sth) = $dbh -> column_info('%', '', $table_name, '%'); and got: (same error as (4) ) 7) I tired: my($column_sth) = $dbh -> column_info('', '%', $table_name, '%'); and got: (same error as (4) ) 8) I tired: my($column_sth) = $dbh -> column_info(undef, '%', $table_name, '%'); and got: Table '%.user_type' doesn't exist at C:/Perl/site/lib//Local/Application.pm line 975 9) I tried: my($column_sth) = $dbh -> column_info('%', undef, $table_name, '%'); and got: (same error as (8) ) So, can column_info be made to work usefully under DBD::mysql? -- Cheers Ron Savage, [EMAIL PROTECTED] on 4/01/2004 http://savage.net.au/index.html