Bob,

> All works fine in batch mode from a command console (eg, c:\mysql\bin\mysql
> < CommandFile ). Also works fine as 'mysql> source CommandFile'. But there
> must be a way to do this thru the DBI API. I've tried the obviuos $dbh->do(
> "source PerlScript" ) and everything else I can think of. Perl always
> complains about syntax, even tho the command file runs from the NT console.

Have you tried this:

# either set the SQL to run in a variable, or read it in from a file
$sql = "CREATE TABLE name ( $FileName )";
$dbh->do( $sql );

chris

Reply via email to