Just installed SQL-Translator and can't get it to work.  I first tried a
simple example from the docs:

        sqlt -f MySQL -t PostgreSQL ~/schema.txt

'schema.txt' looks like this:

# Remove the database if it exists
DROP DATABASE IF EXISTS mydb;

# Create the database
CREATE DATABASE mydb;

# Create the Announcement table
CREATE TABLE mydb.table1 (
    ID
        BIGINT UNSIGNED
        NOT NULL
        AUTO_INCREMENT
        PRIMARY KEY
        COMMENT "ID",
    text
        VARCHAR(255)
    date
        TIMESTAMP
        DEFAULT NOW()
) TYPE=innodb;

which I can feed into the MySQL command line program.  I get the
following error:

       ERROR (line 8): Invalid statement: Was expecting comment, or use,
or
                       set, or drop, or create, or alter, or insert, or
                       delimiter, or empty statement
Error: translate: Error with parser 'SQL::Translator::Parser::MySQL':
no results at /packages/bin/sqlt line 319.

I try connecting directly to my MySQL database figuring that if I don't
have the correct format of schema file, sqlt should be able to get it
from the database itself (which is really what I want).  That gives me
the error:

"my" variable $v masks earlier declaration in same scope
at /packages/lib/perl5/site_perl/5.8.5/SQL/Translator/Parser/DBI/DB2.pm
line 274.
DBD::mysql::st execute 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 'Database' at line 1
at /packages/lib/perl5/site_perl/5.8.5/SQL/Translator/Parser/DBI/MySQL.pm line 
60.
Error: translate: Error with parser 'SQL::Translator::Parser::DBI':
DBD::mysql::st execute 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 'Database' at line 1
at /packages/lib/perl5/site_perl/5.8.5/SQL/Translator/Parser/DBI/MySQL.pm line 
60.

I'm running Perl v5.8.5 with DBI-1.53 and DBD-mysql-4.001 with a MySQL
engine v5.0.27.  I've used DBI/DBD-mysql directly in my own Perl
programs with no problem (fetching data only).

Anybody know what could be wrong?  Thanks in advance for any help.
-- 
Adam Stein @ Xerox Corporation       Email: [EMAIL PROTECTED]
                                            
Disclaimer: All views expressed             
here have been proved to be my own.  [http://www.csh.rit.edu/~adam/]


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-- 
sqlfairy-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers

Reply via email to