dbd

Why doesn't DBD::Sybase's Makefile.PL find freetds?

I'm having trouble trying to install DBD::Sybase on Redhat. Perl version is 5.8.8 and it is the 64-bit version. When I set the SYBASE env variable to the freetds libs in /usr (the rpm puts libtds in /usr/lib64), it gives the following error message $ perl ./Makefile.PL Can't find any Sybase libraries in /usr/lib at ./Makefile.PL line ...

Why does my DBI program complain about 'Undefined subroutine &DBD::Pg::db::_login'?

Hi, I am trying to use PostgreSQL database for storing Apache's session information, but I can't get it to work. It is failing with the following error: Undefined subroutine &DBD::Pg::db::_login It seems that MySQL users have run into the same problem in DBD::MySQL::db. I have the latest CPAN version of both DBI and DBD::Pg. It does...

DBD::Oracle causing corruption to System calls?

Seeing some strange behavior, whereby connecting to Oracle database, and then calling external function, the value of $? is always -1. Problem machine is running standard AIX5.3, with DBD::Oracle 1.20 and DBI 1.602. #!/usr/bin/perl -w use DBI; CORE::system "pwd"; print "Before connect: $?\n"; DBI->connect('dbi:Oracle:', 'pwd', 'pwd'); ...

How do I fix "Symbol not found: _is_prefix" when compiling Perl's DBD::mysql?

First I wanted to build the DBD::mysql package. That kept failing because whatever make resulted in could not be loaded for the tests with a Symbol not found: _is_prefix. So I assumed that cpan might be a tad old. I know it's a random assumption, but cpan did tell me to install the latest Bundle::CPAN. Who's successfully installed eithe...

How can I UPDATE rows returned by a SELECT in a loop?

I have a loop on the rows returned by an SQL SELECT statement, and, after some processing on a row's data, I sometimes want to UPDATE the row's value. The processing in the loop's body is non-trivial, and I can't write it in SQL. When I try to execute the UPDATE for the selected row I get an error (under Perl's DBD::SQLite::st execute ...

How to Install DBD::Oracle in Strawberry Perl

I am trying to install DBD::Oracle using the CPAN shell in Strawberry Perl. I initially experienced an error because the Makefile could not locate an OCI library, so I installed the instant client from Oracle. I thought this would fix the problem, but now I get a large mixture of errors and warnings from Oracle.h, dbdimp.h, Oracle.c, O...

Perl DBD::ODBC Issues with Oracle Date Formats

I am using Perl's DBD::ODBC to connect to an Oracle database. However, an issue arises when I try to execute a select query using a date in the where clause. It seems this issue occurs because of the database's date format being DD-MON-RR (see DBD::ODBC::FAQ). Since I cannot change the database's settings, can anyone suggest a workaro...

What is the difference between DBI and DBD?

Can someone please shed some light on what exactly is DBI and DBD? When should either one be used and the benefits of using one over the other. ...

Manually connect to PostgreSQL with Ruby

Connecting to postgres with rails was no big deal. rails -d postgresql app_name, setup the database.yml and voila. I cannot, however, use postgres with just a little test script I've tried installing the gems postgres, dbi & dbd-pg, pg, and ruby-pg, but with pg/ruby-pg and postgres it fails at the require for require 'postgres' or req...

DBD::Oracle and utf8

Hello, I have some troubles inserting an UTF8 string into an oracle 10 database on Solaris, using the latest DBD::Oracle on perl v5.8.4. This are my DB settings > --------SELECT * from NLS_DATABASE_PARAMETERS------------------------------- > NLS_NCHAR_CHARACTERSET AL16UTF16 > NLS_LANGUAGE AMERICAN > NLS_TERRITORY AMERICA NLS_CURRENCY $...

How I can connect to Oracle from Perl?

We have Oracle Server " Oracle Version: 10.2.0.4.0 - 64bit". I like to connect to this server with Perl from my RHEL machine. I am able to connect via sqlplus successfully. I can use 32-bit or 64-bit Perl. I have few questions. Which files I should download from Oracle.com and where should I install them? What are the environment s...

Why can't Perl's DBD::DB2 find dbivport.h during installation?

We are using a Perl utility to dump data from DB2 database. We installed DBI package and it is asking for DBD package also. We dont have root access and when we try to install DBD package we are getting the following error: ERROR BUILDING DB2.pm [lijumathew@intblade03 DBD-DB2-1.78]$ make make[1]: Entering directory '/home/...

DBD::CSV: Problem with file-name-extensions

In this script I have problems with file-name-extensions: if I use /home/mm/test_x it works, with file named /home/mm/test_x.csv it doesn't: #!/usr/bin/env perl use warnings; use strict; use 5.012; use DBI; my $table_1 = '/home/mm/test_1.csv'; my $table_2 = '/home/mm/test_2.csv'; #$table_1 = '/home/mm/test_1'; #$table_2 = '/home/mm/tes...

Question about DBD::CSB Statement-Functions

From the SQL::Statement::Functions documentation: Function syntax When using SQL::Statement/SQL::Parser directly to parse SQL, functions (either built-in or user-defined) may occur anywhere in a SQL statement that values, column names, table names, or predicates may occur. When using the modules through a DBD or in any other con...

Perl - Too many files error when using DBD Oracle

Can someone advise on why I get errors opening the file in the code below. The errors start about half way through the 9th iteration of 25 threads, and are "Too many open files" errors. The error only happens when running in threads, and only when the DBI connect/disconnect are used. This shouldn't affect the open file count at all shou...

Catalyst create schema can't connect but I can

So I can connect with (obviously I replaced all the real values) mysql -u username -p -h db.dbhostname.com dbname But when I run Catalyt's create script I get ./script/dasgift_create.pl model DB DBIC::Schema MyApp::Schema create=static components=TimeStamp dbi:mysql:dbname:db.dbhostname.com username p@55w0rd DBIx::Class::Schema::Load...

DBD::CSV: Returns header in lower case

I've got a problem with the module DBD::CSV v0.30. Since a update to the newes version, all headers in the fetchrow_hashref generated hash are lower case instead of mixed case. Finaly the data will be comited to a mysql database and the column header should be mixed case. This is a snipet of my script using the DBD::CSV my $csv_dbh ...

Using php to connect to mysql using mod_dbd

Hi, I would like to use mod_dbd to implement connection pooling for my php application. I am able to define the mod_dbd module for apache and I can see the connections that it is opening, but I am not able to "hook on" those connections with my php code. I was trying mysql_connect with parameters and without as well as mysql_pconnect. W...

How can I manually Installing DBD-Oracle 1.17 in ActivePerl on Windows?

After installing Active Perl 5.8.8 Build 822 on WindowsXP, I do not see DBD-Oracle in "View All Packages" of Perl Package Manager. The CPAN location of the same is http://search.cpan.org/dist/DBD-Oracle-1.17/, but I don't know the process to manually install this tar(DBD-Oracle-1.17.tar.gz) in ActivePerl. ...

Why does SQLite give a "database is locked" for a second query in a transaction when using Perl's DBD::SQLite?

Is there a known problem with SQLite giving a "database is locked" error for a second query in a single transaction when using Perl DBD::SQLite? Scenario: Linux, Perl DBI, AutoCommit => 0, a subroutine with two code blocks (using the blocks to localize variable names). In the first code block a query handle is created by prepare() on a s...