[vox-tech] sqlite + perl - wierd unrecognized token error
Shwaine
shwaine at shwaine.com
Thu Dec 23 11:15:23 PST 2004
On Thu, 23 Dec 2004, Peter Jay Salzman wrote:
<snip>
> DBD::SQLite::db do failed: unrecognized token: ":" at Create_Tables.pm line
> 52, <> line 6.
>
<snip>
> Excerpt from Create_Tables.pm:
>
<snip>
> my $dbh = DBI->connect("dbi:SQLite:$table_name");
>
<snip>
> Statement handle DBI::st=HASH(0x840773c) DESTROY ignored - never set up
> ERROR: 1 'unrecognized token: ":"' (err#0)
In my MySQL connections, I have database=$table_name, not just
$table_name. That is a driver specific syntax though, so you may want to
check the documentation for your specific driver to see if that is the
syntax it expects. Another thing I did when debugging a program was to put
the SQL command in a string, print the string, then pass the string to do.
Then I could see exactly what was passed to do. You might also want to set
the RAISE_ERROR attribute in the connect, so that if that is what is
causing the problems, the program will die on that statement. The last
line of the debug code makes me think the issue is with the connect
statements, not the do statements.
More information about the vox-tech
mailing list