dbd

Error using perl module DBD::mysql in ActivePerl 5.28 on Windws10 64bits

时光毁灭记忆、已成空白 提交于 2021-02-19 08:01:48
问题 I installed the new ActiveState Perl custom build with Perl 5.28 and I added the module (DBD-mysql v4.50). The DBI module is set by default to the ActivePerl 5.28 compilation. use strict; use warnings; use diagnostics; use DBI; ### INIT DB CONNECTION my $dbh = DBI->connect("DBI:mysql:database=testdb;host=localhost","root", "XXXX",{'RaiseError' => 1,'mysql_auto_reconnect' => 1}); $dbh->{InactiveDestroy} = 1; $dbh->{mysql_auto_reconnect} = 1; then I get the following error: >perl test.pl

Using Ubuntu, how do I install DBD::Sybase from CPAN?

孤街浪徒 提交于 2019-12-24 00:57:56
问题 Whenever I try to build DBD::Sybase to connect to MSSQL I get an error, $ sudo cpanp install DBD::Sybase Installing DBD::Sybase (1.15) Running [/usr/bin/perl /usr/bin/cpanp-run-perl /home/ecarroll/.cpanplus/5.14.2/build/DBD-Sybase-1.15/Makefile.PL INSTALLDIRS=site]... Can't find any Sybase libraries in /etc/lib or /etc/lib64 at /home/ecarroll/.cpanplus/5.14.2/build/DBD-Sybase-1.15/Makefile.PL line 155, <IN> line 44. BEGIN failed--compilation aborted at /usr/bin/cpanp-run-perl line 11, <IN>

DBD::ODBC vs win32::odbc

淺唱寂寞╮ 提交于 2019-12-12 15:49:28
问题 I wonder what are the advantages and disadvantages using one over the other. This question originated from an advice I got here: Allocate buffer dynamically for DB query according to the record actual size I am looking for a list of the important differences (and not an exhaustive list) that will help me to make an educated decision. I have working experience with win32::odbc and can testify genuinely about it. It will very helpful if someone can share his/hers experience on top of the ‘dry’

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

独自空忆成欢 提交于 2019-12-12 11:15:44
问题 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 failed: database table is locked). Is there a readable, efficient, and portable way to achieve what I'm trying to do? Failing that, is there a DBD or SQLite

How to manually specify the column names using DBD::CSV?

两盒软妹~` 提交于 2019-12-11 14:07:34
问题 I am using DBD::CSV to show csv data. Sometimes the file doesn't contain column names, so we have to manually define it. But after I followed the documentation, I got stuck with how to make the attribute skip_first_row work. The code I have is: #! perl use strict; use warnings; use DBI; my $dbh = DBI->connect("dbi:CSV:", undef, undef, { f_dir => ".", f_ext => ".txt/r", f_lock => 2, csv_eol => "\n", csv_sep_char => "|", csv_quote_char => '"', csv_escape_char => '"', csv_class => "Text::CSV_XS"

Trouble installing DBD::mysql under macOS Mojave

馋奶兔 提交于 2019-12-11 01:09:25
问题 Can't install DBD::mysql under macOS Mojave with perl v5.18.2 MySQL Community Server 8.0.13 is installed from DMG from the official site. Here is the installation log via cpan: Checking if libs are available for compiling... dyld: Library not loaded: @rpath/libmysqlclient.21.dylib Referenced from: /Users/dmitry/.cpan/build/DBD-mysql-4.049-B01C7C/assertliblxuNN4_E Reason: image not found dyld: Library not loaded: libssl.1.0.0.dylib Referenced from: /Users/dmitry/.cpan/build/DBD-mysql-4.049

How do you install perl DBD::Oracle on OSX Snow Leopard 10.6

最后都变了- 提交于 2019-12-10 22:00:00
问题 I'm trying to connect to Oracle 10.2.0.4 on a remote system from my intel mac running OSX 10.6 snow leopard. I've tried using perl CPAN to install DBD::Oracle (DBI worked ok) but get compilation errors. Could someone provide an easy to follow guide? 回答1: Getting a mac install of perl to play nicely with oracle is a bit of a pain - once it's running it is fantastic, getting it running is a little frustrating.. The below has worked for me on a few different intel macs, there could well be

%ENV doesn't work and I cannot use shared library

故事扮演 提交于 2019-12-01 03:16:37
I cannot use %ENV var on my Perl script to use Oracle libs. BEGIN { $ORACLE_HOME = "/usr/lib/oracle/10.2.0.3/client64"; $LD_LIBRARY_PATH = "$ORACLE_HOME/lib"; $ORACLE_SID="prod"; $ENV{ORACLE_SID}=$ORACLE_SID; $ENV{ORACLE_HOME}= $ORACLE_HOME; $ENV{LD_LIBRARY_PATH}= $LD_LIBRARY_PATH; }; If I print $ENV{'ORACLE_HOME'} and $ENV{'LD_LIBRARY_PATH'} all seems ok but, when I run my script I have the error: install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at

%ENV doesn't work and I cannot use shared library

那年仲夏 提交于 2019-11-30 23:44:46
问题 I cannot use %ENV var on my Perl script to use Oracle libs. BEGIN { $ORACLE_HOME = "/usr/lib/oracle/10.2.0.3/client64"; $LD_LIBRARY_PATH = "$ORACLE_HOME/lib"; $ORACLE_SID="prod"; $ENV{ORACLE_SID}=$ORACLE_SID; $ENV{ORACLE_HOME}= $ORACLE_HOME; $ENV{LD_LIBRARY_PATH}= $LD_LIBRARY_PATH; }; If I print $ENV{'ORACLE_HOME'} and $ENV{'LD_LIBRARY_PATH'} all seems ok but, when I run my script I have the error: install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so'

How to Install DBD::Oracle in Strawberry Perl

喜你入骨 提交于 2019-11-30 12:49:18
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 , Oracle.xsi , and Oracle.xs . Any suggestions for how I should proceed? Is it possible that there is a problem with existing Oracle software on my computer? I am fairly new to Perl, so any help is appreciated. Edit -- I'm including the entire output below: cpan>