If you only have DBI, there are command shells that allow you to connect to any DBI database and execute commands. For example DBI::Shell allows that.
If you are content with just running commands from the command line, DBIx::RunSQL can be abused for that too:
#!/opt/perl/perl-5.18/bin/perl -w use strict; use DBIx::RunSQL; my $options= DBIx::RunSQL->parse_command_line( 'sql_admin.pl' ); $options->{ user } ||= $ENV{ IQ_USER } || 'scott'; $options->{ password } ||= $ENV{ IQ_PASSWORD } || 'tiger'; if( ! $options->{ sql }) { $options->{ sql }= shift @ARGV; }; no warnings 'newline'; if( ! -f $options->{ sql }) { $options->{ sql }= \"$options->{sql}"; # in-memory file }; $options->{ dsn }||= $ENV{IQ_DSN} || 'dbi:SQLAnywhere:eng=q123;links=t +cpip'; DBIx::RunSQL->create( %$options );
In reply to Re: How to connect to SQLite database.
by Corion
in thread How to connect to SQLite database.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |