sql-o-matic on Sep 16, 2008 at 02:31 UTC | by smiffy |
This is about the fourth generation of this programme that I have been using over the last few years to generate SQL and Perl code based on a MySQL database schema. The idea behind this is much repetitive coding can be eliminated - the ouput of this programme can be tweaked/corrected and then cut and pasted into an application. | |
Batch database creation on Aug 10, 2008 at 10:08 UTC | by Gangabass |
Sometimes you need to create several databases and upload same SQL dump to each database. So this little script help you complete this task. You can run it like so: $batch_databases.pl --host="localhost" --user="root" --password="secretpass" --create_db="test_db" --create_user="test_db_user" --create_password="test_user_password" --dumpfile="test_dump2.sql" | |
"Getting Sql server identiy column value after insert on Jul 15, 2008 at 20:13 UTC | by zhirsr |
Getting the identity column value of your last insert statement is tricky with DBI. the "SELECT SCOPE_IDENTITY()" statement MUST be in the same sql statement as the execute. Below is sample code from a mantis conversion program which inserts a row into the database and gets the identity column value back. Look at $insertSQL for details | |
tblSync on Sep 06, 2007 at 18:25 UTC | by tcf03 |
syncs database tables. My main use is to sync Informix tables and MS SQL Server tables. ini file looks like this:
| |
Class::DBI keys as accessors on Jul 25, 2007 at 15:14 UTC | by duncs |
When using Class::DBI with a table such as:
you want to use: instead of:
| |
Simple interface to DBI on May 11, 2007 at 14:47 UTC | by Qiang |
I wrote this to avoid writing the same kind of DBI calls in my program. I haven't used this module that much yet. but i would like to hear what your thought to it. | |
PL/Perl - Oracle "decode( )" for Postgresql on Jan 31, 2007 at 01:43 UTC | by Madams |
This node is just to point to my SOPW entry which should belong here actually. | |
How to reconnect a dead DBD::Sybase Connection on Nov 08, 2006 at 20:11 UTC | by jfroebe |
It is important to know that this is just one method of reconnecting a dead connection. Note that we are handling the errors manually for the individual query. It wouldn't take much to create a db_exec subroutine so we just call the db_exec() subroutine and just worry about the reconnect in one place. Notice that because of DBD::Sybase bug # 616, the error 151 will be printed to STDERR.
|