Re: DBD::ODBC and issues getting LongTruncOk / LongReadLen to take effect

2018-11-15 Thread Ron Savage

Hi Dan

Does it make any difference if you put LongReadLen and LongTruncOK next 
to RaiseError in the attrs?


On 16/11/18 10:54, Daniel Kasak wrote:
Hi Martin. Sorry for the very long delay. We had abandoned the ODBC 
driver in favour of the native DBD::DB2, and I've been working on this 
project outside my normal work hours anyway, so got bogged down in other 
issues ...


I've uploaded the trace to: https://tesla.duckdns.org/downloads/trace.log
The script I'm using to generate this is: 
https://tesla.duckdns.org/downloads/db2_syscat_columns.pl


It dies on the 1st call of $sth->fetchrow_hashref():
  DBD::ODBC::st fetchrow_hashref failed: st_fetch/SQLFetch (long 
truncated DBI attribute LongTruncOk not set and/or LongReadLen too 
small) (SQL-HY000) at db2_syscat_columns.pl 
<http://db2_syscat_columns.pl> line 36.


Thanks for your time ...

Dan

On Thu, Apr 5, 2018 at 9:50 PM Martin J. Evans via dbi-users 
mailto:dbi-users@perl.org>> wrote:


On 05/04/18 12:24, Daniel Kasak wrote:
 > Hi all.
 >
 > I'm writing a database utility that has to access IBM's "DashDB"
and other DB2-variants. I have their latest ODBC driver, and I have
simple queries working. However queries against their system catalog
are not working - queries appear to be returning *empty* recordsets.
After some laborious debugging, I can see that when I call
$sth->fetchrow_array, DBI::errstr is set to:
 >
 > st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not
set and/or LongReadLen too small) (SQL-HY000)
 >
 > I've dealt with this before. So when constructing my $dbh, I do:
 >
 > $self->{dbh}->{LongReadLen} = 65535 * 1024 # 64MB - yes I know
it's big
 > $self->{dbh}->{LongTruncOK} = 1;
 >
 > This usually fixes things - or at least has for SQL Server and
Netezza. For DB2 connections however, it appears to have no effect.
 >
 > I've turned on ODBC tracing immediately prior to calling
$sth->prepare ... $sth->execute ... $sth->fetchrow_array:
 > https://paste.pound-python.org/show/hS6ur7dwGRsQubr29HFT/
 >
 > This one was from the query:
 > select * from SYSCAT.COLUMNS
 >
 > Does anyone know why LongTruncOk / LongReadLen are not being
honored here?
 >
 > I'm using unixODBC-2.3.6, DBD::ODBC from git, and the latest
available DB2 ODBC driver.
 >
 > Please help! Thanks :)
 >
 > Dan

There are some very long columns in that result-set but I can't tell
from the unixodbc log alone what has happened.
Can you reduce your perl to the simplest test you can and rerun with

DBI_TRACE=15=trace.log perl mycode.pl <http://mycode.pl>

and show me the trace.log file.

Martin



--
Ron Savage - savage.net.au


Re: (Fwd) Oracle.pm

2017-03-06 Thread Ron Savage

Hi Gautam

P.S. Do not reply to me directly. Always reply to the DBI Users list.

On 07/03/17 11:00, Ron Savage wrote:

Hi Gautam

You don't need to examine the source code of Oracle.pm. You need to
print out the values of ($dbh,$dbname,$user,$auth,$attr) and focus
purely on them, and how they differ from what Oracle.pm expects.

On 07/03/17 10:22, Tim Bunce wrote:

- Forwarded message from Gowtham <shiningstargau...@gmail.com> -

Date: Mon, 6 Mar 2017 15:40:59 -0600
From: Gowtham <shiningstargau...@gmail.com>
To: tim.bu...@pobox.com
Subject: Oracle.pm

Hi Tim,

I feel that you are the right person to check this with.

I am trying to understand the code on Oracle.pm (DBD::Oracle) to debug
my perl code which tries to make a connection to an Oracle DB. My code
exits on the below piece of code on debug mode and i am unable to
establish the reason for it.
   DBD::Oracle::db::_login($dbh,$dbname,$user,$auth,$attr) or return
undef;

I am unable to find the definition for the subroutine _login() which
will help me to understand the reason for returning 'undef'. Could you
please kindly advice me.

Correct me if i have reached a wrong email.

Thanks - Gautam

- End forwarded message -----





--
Ron Savage - savage.net.au


Re: (Fwd) Oracle.pm

2017-03-06 Thread Ron Savage

Hi Gautam

You don't need to examine the source code of Oracle.pm. You need to 
print out the values of ($dbh,$dbname,$user,$auth,$attr) and focus 
purely on them, and how they differ from what Oracle.pm expects.


On 07/03/17 10:22, Tim Bunce wrote:

- Forwarded message from Gowtham <shiningstargau...@gmail.com> -

Date: Mon, 6 Mar 2017 15:40:59 -0600
From: Gowtham <shiningstargau...@gmail.com>
To: tim.bu...@pobox.com
Subject: Oracle.pm

Hi Tim,

I feel that you are the right person to check this with.

I am trying to understand the code on Oracle.pm (DBD::Oracle) to debug my perl 
code which tries to make a connection to an Oracle DB. My code exits on the 
below piece of code on debug mode and i am unable to establish the reason for 
it.
   DBD::Oracle::db::_login($dbh,$dbname,$user,$auth,$attr) or return undef;

I am unable to find the definition for the subroutine _login() which will help 
me to understand the reason for returning 'undef'. Could you please kindly 
advice me.

Correct me if i have reached a wrong email.

Thanks - Gautam

- End forwarded message -----



--
Ron Savage - savage.net.au


Re: DBD::SQLAnywhere SEGV when Oracle handle exists

2017-03-02 Thread Ron Savage

Hi Doug

On 03/03/17 09:54, Douglas Wilson wrote:

DBD::SQLAnywhere seems to work ok for Sybase IQ, but if I first create a
DBD:Oracle handle, the SQLAnywhere connect hangs for a while, and
eventually segfaults. FYI on redhat Linux.


First thing we ask: What versions of everything are you using!?

--
Ron Savage - savage.net.au


Re: Fwd: DBD::CSV attempt to free unreferenced scalar during global destruction

2017-01-16 Thread Ron Savage

Hi Roy

See updated gist for re-run and module versions.

And, I'm on the list, so no need to copy me directly.

On 17/01/17 10:09, Roy Storey wrote:

Hi Ron,

Thanks for taking the time to have a look. I see you are using 5.20.2,
could it be that your installed modules are not at the same version as
mine? Sorry for not being more detailed in my report. I've updated the
'cpanfile' to lock to specific versions I'm using and removed the
'quote_empty' option as it is only in Text::CSV_XS >= 1.18
<https://github.com/Tux/Text-CSV_XS/commit/f9133e3684f45a6613002f055e3010743d3ea855>
 and
it is not required for this.

I'd be grateful if you could fetch and re-run - without quote_empty
updating modules shouldn't be required (I just ran with Text::CSV_XS
version 1.17 as a check).

Roy

On 17 January 2017 at 10:51, Ron Savage <r...@savage.net.au
<mailto:r...@savage.net.au>> wrote:

Hi Roy

I ran your code - unsuccessfully -  and added the output as a
comment to your gist.


On 16/01/17 20:54, Roy Storey wrote:

Hello,

I'm here looking for help with an issue I'm having with DBD::CSV.

Specifically, I'm attempting to use the 'after_parse' callback
to handle
a csv file with a data defined variable number of columns and hit a
warning on an attempt to free unreferenced scalar during global
destruction.

I've prepared a minimal example at
https://gist.github.com/kiwiroy/fa0c737ff3f298cb064e554505bc4495
<https://gist.github.com/kiwiroy/fa0c737ff3f298cb064e554505bc4495>
so show
the issue. The two test scripts process the 'input.csv' with
Text::CSV
and DBD::CSV respectively and only the latter exhibits the
behaviour.

It appears to be 5.24.0 specific. I'm using default perlbrew
built perls.

Is there something I'm missing or doing wrong?

Thanks in advance.

    Roy



--
Ron Savage - savage.net.au <http://savage.net.au>





--
Ron Savage - savage.net.au


Re: DBD::CSV attempt to free unreferenced scalar during global destruction

2017-01-16 Thread Ron Savage

Hi Roy

I ran your code - unsuccessfully -  and added the output as a comment to 
your gist.


On 16/01/17 20:54, Roy Storey wrote:

Hello,

I'm here looking for help with an issue I'm having with DBD::CSV.

Specifically, I'm attempting to use the 'after_parse' callback to handle
a csv file with a data defined variable number of columns and hit a
warning on an attempt to free unreferenced scalar during global
destruction.

I've prepared a minimal example at
https://gist.github.com/kiwiroy/fa0c737ff3f298cb064e554505bc4495 so show
the issue. The two test scripts process the 'input.csv' with Text::CSV
and DBD::CSV respectively and only the latter exhibits the behaviour.

It appears to be 5.24.0 specific. I'm using default perlbrew built perls.

Is there something I'm missing or doing wrong?

Thanks in advance.

Roy




--
Ron Savage - savage.net.au


Re: Error while installing DBD-mysql-4.041

2016-12-23 Thread Ron Savage

Hi

Ask dpkg which package contains mysql_config:

shell> dpkg --search mysql_config
libmysqlclient-dev: /usr/share/man/man1/mysql_config.1.gz
libmysqlclient-dev: /usr/bin/mysql_config


On 23/12/16 21:46, Lakshman Sahoo wrote:


Hi Support
I am trying to install DBD-mysql-4.041 in ubuntu 14.4 and getting the
bellow error message. Could you please help me to over come the issue?

Message
root1@root1-Veriton-M200-H81:~/Downloads/DBD-mysql-4.041$ perl Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 88.

Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root1' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root1'@'localhost' identified
by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line
561.
Can't find mysql_config. Use --mysql_config option to specify where
mysql_config is located
Failed to determine directory of mysql.h. Use

  perl Makefile.PL --cflags=-I

to set this directory. For details see DBD::mysql::INSTALL,
section "C Compiler flags" or type

  perl Makefile.PL --help

Waiting for your kind suggestions.

Thanks and Regards
Lakshman


--
Lakshman Sahoo (ARS)

Division of Fish Genetics and Biotechnology,
ICAR-Central Institute of Freshwater Aquaculture,
Kausalyaganga, Bhubaneswar, Odisha, India Pin-751002


--
Ron Savage - savage.net.au


Re: Error while installing DBD-mysql-4.041

2016-12-23 Thread Ron Savage

Hi

Ask dpkg which package includes mysql_config:

shell> dpkg --search mysql_config
libmysqlclient-dev: /usr/share/man/man1/mysql_config.1.gz
libmysqlclient-dev: /usr/bin/mysql_config

So now you know what to install.

On 23/12/16 21:46, Lakshman Sahoo wrote:


Hi Support
I am trying to install DBD-mysql-4.041 in ubuntu 14.4 and getting the
bellow error message. Could you please help me to over come the issue?

Message
root1@root1-Veriton-M200-H81:~/Downloads/DBD-mysql-4.041$ perl Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 88.

Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root1' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root1'@'localhost' identified
by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line
561.
Can't find mysql_config. Use --mysql_config option to specify where
mysql_config is located
Failed to determine directory of mysql.h. Use

  perl Makefile.PL --cflags=-I

to set this directory. For details see DBD::mysql::INSTALL,
section "C Compiler flags" or type

  perl Makefile.PL --help

Waiting for your kind suggestions.

Thanks and Regards
Lakshman


--
Lakshman Sahoo (ARS)

Division of Fish Genetics and Biotechnology,
ICAR-Central Institute of Freshwater Aquaculture,
Kausalyaganga, Bhubaneswar, Odisha, India Pin-751002


--
Ron Savage - savage.net.au


Re: DBIx HAVING and COUNT error

2016-09-04 Thread Ron Savage

Hi Rajeev

On 05/09/16 12:07, Rajeev Prasad via dbi-users wrote:

sorry i didnt understand.

how can this have it?

my $obj_rs = $schema->resultset('itemList')->serach(
{ t_id => { -in => [ $tStr ] }},
{
group_by => [ qw(i_id) ],
HAVING COUNT('t_id') = $tCount
}
);


No. It isn't Perl. And it doesn't match the docs for DBIx::Class.

--
Ron Savage - savage.net.au


Re: DBIx HAVING and COUNT error

2016-09-03 Thread Ron Savage

Hi Rajeev

On 03/09/16 15:58, Rajeev Prasad wrote:

I tried what you said and also what manual says, but it is not working
my tries:
HAVING => { count('t_id') => $tCount}
HAVING => {'COUNT_t_id' => {'=', $tCount } }
HAVING => { count('t_id') => {'=', $tCount } }

  having => { 'count_employee' => { '>=', 100 } }


Those docs tell me that the SQl has to include something like:

'select ... count(t_id) as count_t_id ...

And then the having can be

having => {count_t_id => {'=', $tCount} }

--
Ron Savage - savage.net.au


Re: DBIx HAVING and COUNT error

2016-09-02 Thread Ron Savage

Hi Rajeev

On 03/09/16 11:38, Rajeev Prasad via dbi-users wrote:

DBIx error in webserver log:

[cgi:error] [pid 29640] ... AH01215: Can't locate object method "HAVING"
via package "COUNT" (perhaps you forgot to load "COUNT"?)


the query:

my $obj_rs = $schema->resultset('itemList')->serach(
{ t_id => { -in => [ $tStr ] }},
{
group_by => [ qw(i_id) ],
HAVING COUNT('t_id') = $tCount


What is this? The syntax you have used is simple not Perl.

I did not check the manual, but try (wild guess):

 "having count('t_id')" => $tCount,


}
);


currently database has no records which match the query. but i was not
expecting such an error.

what is wrong in my statement?

thank you.
Rajeev


--
Ron Savage - savage.net.au


Re: DBD::XML

2016-08-31 Thread Ron Savage

Hi Nigel

On 01/09/16 02:02, Nigel Horne wrote:

Uploaded to https://metacpan.org/release/NHORNE/DBD-XMLSimple-0.01

Now to see what the cpantesters come up with.


The 2nd line of the Synopsis looks like it's meant to be N separate lines.

--
Ron Savage - savage.net.au


Re: Fwd: Re: DBD::XML

2016-08-20 Thread Ron Savage

Hi Nigel


This usage of $ABCx or $AbcX is a wide-spread convention. E.g.
Marpa::* is exclusively used by Jeffrey Kegler, and all ours are
MarpaX::*. But there are many, many modules called ${Something}x::* as
add-ons to $Something.

And yes, for DBI and other it's 'x', elsewhere it's often 'X'.


For clarification, are you saying that my driver should be called
DBDx::XML?  The reason I ask is that all the DBDx::* modules I could
find seem to be extensions to DBI or things that use DBI, rather than
DBI drivers or backends.


Not exactly. I'm rather saying that drivers of specific types (i.e. 
behave in specific ways) do follow a standardized naming convention. 
It's then up to you to decide if your module resembles those others, or not.



Also would that confuse with the existing DBIx::XML code?  That does
something entirely different.


Indeed it would. So don't do that :-).

--
Ron Savage - savage.net.au


Re: DBD::XML

2016-08-19 Thread Ron Savage

Hi Nigel


I'm more than happy to entertain other names if you have any suggestions.


See also http://prepan.org/ for a place to discuss module naming

--
Ron Savage - savage.net.au


Re: DBD::XML

2016-08-19 Thread Ron Savage

Hi Nigel

On 20/08/16 01:51, Tim Bunce wrote:

On Fri, Aug 19, 2016 at 10:09:45AM -0400, Nigel Horne wrote:

On 8/19/16 9:56 AM, Tim Bunce wrote:

On Fri, Aug 19, 2016 at 09:30:32AM -0400, Nigel Horne wrote:

[snip]

But I wonder about the name. "DBD::XML" seems to be a bold name,
implying that it's _the_ DBI interface for data stored in XML files.
Of course the same kind of issue applies to many other drivers,
so it's not a major concern, but does seem worth dicussing.


I'm more than happy to entertain other names if you have any suggestions.


As a rule, we have DBI (there's just one) and anything it uses (DBI::*), 
and then we have DBIx::* for all our additions in thefield. That is, we 
all agree to explicitly avoid using DBI::*. Even drivers loaded by DBI 
are called DBD::Pg, DBD::mysql, DBD::SQLite, etc.


This usage of $ABCx or $AbcX is a wide-spread convention. E.g. Marpa::* 
is exclusively used by Jeffrey Kegler, and all ours are MarpaX::*. But 
there are many, many modules called ${Something}x::* as add-ons to 
$Something.


And yes, for DBI and other it's 'x', elsewhere it's often 'X'.

--
Ron Savage - savage.net.au


Re: DBD::XML

2016-08-18 Thread Ron Savage

Hi Nigel

On 19/08/16 05:49, Nigel Horne wrote:

I've started working on a DBD::XML driver, and the first pass is looking
good.  I'm doing this because of the demise of DBD::AnyData, and
DBD::AnyData2 isn't ready yet, so until it is I wanted XML support.

Before I go any further, is anyone else working on something similar or
is there something already out there?  I don't want to re-invent the wheel.


It sounds vaguely like my 
https://metacpan.org/release/DBIx-Admin-BackupRestore.


--
Ron Savage - savage.net.au


Re: (Fwd) DBI Dilemma

2015-08-18 Thread Ron Savage

Hi

$quote = $dbh - get_info(29); # SQL_IDENTIFIER_QUOTE_CHAR.

--
Ron Savage - savage.net.au


Re: Escaping placeholders, take 2

2014-12-30 Thread Ron Savage

Hi All

My apologies. Instead of Text::Balanced::Marpa, I should have pointed 
you to MarpaX::Languages::SQL2003::AST.


Here, AST is Abstract syntax tree. See 
https://en.wikipedia.org/wiki/Abstract_syntax_tree.


--
Ron Savage - savage.net.au


Re: Escaping placeholders, take 2

2014-12-28 Thread Ron Savage

Hi Darren

On 29/12/14 13:59, Darren Duncan wrote:


The API could involve an 'attr' given when preparing a SQL statement or
other appropriate places.

   placeholder_escape_delimiters = [ '\{','}' ]
   placeholder_escape_delimiters = [ '\{','}','\[',']' ]
   placeholder_escape_delimiters = [ '\{{{','}}}' ]
   placeholder_escape_delimiters = [ '{{{','}}}' ]

In this way, the backslash is no longer special, or necessary, though I
anticipate it would often still be used for the mnemonics.

Rather, when the driver is parsing the SQL for placeholders, if it
encounters any left delimiter strings, if will leave the following SQL
unaltered until it encounters the corresponding right delimiter string,
and then it looks for placeholders again.


Perhaps a job for https://metacpan.org/release/Text-Balanced-Marpa

--
Ron Savage - savage.net.au


Any SQL::Abstract design document?

2014-12-23 Thread Ron Savage

Hi All

The author of MarpaX::Languages::SQL2003::AST has asked me if there is a 
design document for SQL::Abstract. Any ideas?


--
Ron Savage - savage.net.au


Re: DBD::mysql mysql_server_prepare=1 caching of statement handles

2014-06-20 Thread Ron Savage

Hi Wouter

On 20/06/14 18:00, Wouter de Geus wrote:

* Ron Savage r...@savage.net.au [2014-06-20 08:17:25 +1000]:


Hi Wouter

Which version of DBD::mysql are you using?


DBD::mysql 4.027
DBI 1.631


Thanx. I can't explain the problem, but it's always helpful to know 
which versions your dealing with.


--
Ron Savage
savage.net.au


Re: DBD::mysql mysql_server_prepare=1 caching of statement handles

2014-06-19 Thread Ron Savage

Hi Wouter

Which version of DBD::mysql are you using?

--
Ron Savage
savage.net.au


Re: error can't locate DBI.pm

2014-05-21 Thread Ron Savage

Hi

See below.

On 21/05/14 00:40, Daminto Lie wrote:

Hi,

I've been getting the following errors after installing DBI and DBD-mysql 
manually from source.

Can't locate DBI.pm in @INC (@INC contains:
/etc/perl
/usr/local/lib/perl/5.14.2
/usr/local/share/perl/5.14.2
/usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.14
/usr/share/perl/5.14
/usr/local/lib/site_perl .)


So this particular Perl does not look in /root/perl5/ as you report below.

Who are you logged in as when you do this?


This was how I installed the DBI-1.631.

- perl Makefile.PL
- make
- make test
- make test TEST_VERBOSE=1
- make install


Who are you logged in as when you do this?


And this was how I installed DBD-mysql-4.027

- perl Makefile.PL = --mysql_config=/home/mysql/bin/mysql_config 
--testuser=root --testpassword=myPasswd
- make -j3
- make test
- checkinstall -D make install


Who are you logged in as when you do this?


I also noticed that during the completion of the installation of DBI, it 
actually installed it in the /root directory as follows:

Installing 
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/auto/DBI/Driver_xst.h

[snip]

Perhaps you were logged on as root when you installed this version of 
Perl and DBI.



And Furthermore, I might have accidentally installed Perl twice - one manually 
from the source and the other from the Repo.

Thus, now, my DBI.pm is located in the following location:
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/DBI.pm
/root/perl5/lib/perl5/i686-linux-gnu-thread-multi-64int/Bundle/DBI.pm


That's normal. The problem lies elsewhere.


This has affected the operation of my spamassassin, amavis and sqlgrey. All of 
them throw up a similar error

For spamassassin, the error is Can't locate DBI.pm in @INC (@INC contains: lib 
/usr/local/share/perl/5.14.2 /etc/perl /usr/local/lib/perl/5.14.2 
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl) at 
/usr/local/share/perl/5.14.2/Mail/SpamAssassin/SQLBasedAddrList.pm line 82.


This suggests spamassassin (and amavis etc below) are not logged on as 
root when they run. That is, they are using a different Perl than the 
one installed as root.



For amavis, the error is Can't locate DBI.pm in @INC (@INC contains: lib 
/etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl) at 
/usr/local/share/perl/5.14.2/Mail/SpamAssassin/BayesStore/SQL.pm line 50.

Can't locate DBI.pm in @INC (@INC contains: lib /etc/perl 
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl) at 
/usr/local/share/perl/5.14.2/Mail/SpamAssassin/BayesStore/MySQL.pm line 51.

For sqlgrey, it is Can't locate DBI.pm in @INC (@INC contains: /etc/perl 
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 
/usr/local/lib/site_perl .) at /usr/sbin/sqlgrey line 34.
BEGIN failed--compilation aborted at /usr/sbin/sqlgrey line 34.

I was wondering if there is any way of pointing it to the right location of DBI 
and DBD-mysql so that it would be able to load the DBI.pm (without having to 
rebuild my system from scratch)


Each version of Perl installed knows if and where DBI is installed.

How many versions of Perl do you have installed?

Which version is being used by each of the programs you've having 
trouble with?


--
Ron Savage
savage.net.au


Re: unable to locate DBI.pm

2014-05-21 Thread Ron Savage

Hi

On 22/05/14 10:39, Daminto Lie wrote:

Thank you Chad and sorry if I sent the reply to you to your personal address.

Before I do that, I have another question.

I normally install and update MySQL from source manually whenever the new 
version is released. Now, if I install DBD-mysql from the Ubuntu Repository 
rather than from the source, would it cause any problems with the latest 
version of MySQL?


No.


Thank you very much


On Thursday, 22 May 2014 3:46 AM, Chad Wallace cwall...@lodgingcompany.com 
wrote:




Posting back to the list...  Please don't reply to me personally; I am
subscribed to the list.


On Tue, 20 May 2014 18:23:52 -0700 (PDT)
Daminto Lie dli...@yahoo.com.au wrote:


Thanks a lot for your reply.

I think this is what I should be using to install DBI and DBD-mysql.


But as I mentioned to John before that I think I need to get rid of
DBI-1.641 first before running the command you suggested. please
correct me if I'm wrong.


Well, it doesn't seem like that DBI installation is even doing
anything.  But yes, you should remove it, just to get rid of
the clutter.  I would just run this:

rm -r /root/perl5

Then install DBI and DBD-mysql from your distro's packaging system.
They'll be put in the correct place (one of the perl locations under
/usr/share or /usr/lib), and then spamassassin and the others will be
able to use them.





On Wednesday, 21 May 2014 10:32 AM, Chad Wallace
cwall...@lodgingcompany.com wrote:


On Tue, 20 May 2014 17:22:58 -0700

John R Pierce pie...@hogranch.com wrote:


what operating system are you on?  isn't there a DBI and such in the
OS package repository?

for instance, on a RHEL/CentOS/Fedora type system, I'd use...

   sudo yum install perl-DBI perl-DBD-MySQL

of course, for a different Linux distribution, or another OS
entirely, both the command and the package names are probably
different.


on Debian and related distros:

sudo apt-get install libdbi-perl libdbd-mysql-perl








--
Ron Savage
savage.net.au


Re: Database encoding not recognized by DBD::Pg

2014-04-07 Thread Ron Savage

Hi Marica

On 07/04/14 18:59, Marica wrote:

On Mon, 07 Apr 2014 08:11:49 +1000
Ron Savage r...@savage.net.au wrote:


Hi Vincent

I ran a few tests, using:

cat /etc/default/locale
#  File generated by update-locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en

No problems showed up.



It only shows outside of ASCII ('é', 'ç' dont display correctly, as shown in 
the link in my original post). So if you used english characters, you can't see 
it.


Of course, but I tested Unicode characters which are not ASCII, OK?

--
Ron Savage
savage.net.au


Re: Database encoding not recognized by DBD::Pg

2014-04-07 Thread Ron Savage

Hi Vincent

On 07/04/14 20:03, Vincent Veyron wrote:

On Mon, 07 Apr 2014 08:11:49 +1000
Ron Savage r...@savage.net.au wrote:



I ran a few tests, using:

cat /etc/default/locale
#  File generated by update-locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en




It only shows outside of ASCII ('é', 'ç' dont display correctly, as shown in 
the link in my original post). So if you used english characters, you can't see 
it.


As I replied to Marica, the tests involve non-ASCII Unicode characters.

I listed the locales because others have done so.

--
Ron Savage
savage.net.au


Re: Database encoding not recognized by DBD::Pg

2014-04-07 Thread Ron Savage

Hi Vincent

On 07/04/14 22:03, Vincent Veyron wrote:

On Mon, 07 Apr 2014 20:10:31 +1000
Ron Savage r...@savage.net.au wrote:



Of course, but I tested Unicode characters which are not ASCII, OK?



duh! sorry about that, I should have known better. It's been a long week...

Note that the server with the fr_FR:fr encoding is the one that displays 
characters correctly, as in your tests. It's the one with only fr_FR@euro that 
doesn't (on a cluster that was initialized with LATIN9; mixed encodings work 
fine on a UTF-8 default cluster).

I don't quite grasp locales related matters in Debian. I tried adding it 
manually in /etc/default/locale on the faulty server, running dpkg-reconfigure 
afterwards, but to no avail.


AFAICT locales have no effect on my code.

I do have a policy of creating databases with:

create database $name owner $role encoding 'UTF8';

See also:

http://savage.net.au/Perl/dbd.utf8.pl

--
Ron Savage
savage.net.au


Re: Database encoding not recognized by DBD::Pg

2014-04-06 Thread Ron Savage

Hi Vincent

I ran a few tests, using:

cat /etc/default/locale
#  File generated by update-locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en

No problems showed up.

On 07/04/14 03:59, Vincent Veyron wrote:

On Sun,  6 Apr 2014 16:01:54 -
Greg Sabino Mullane g...@turnstep.com wrote:



What are server_encoding and client_encoding set to on each database?



Hi Greg,

Same thing for both servers:

ppro_utf8= show client_encoding;
  client_encoding
-
  LATIN9
(1 ligne)

ppro_utf8= show server_encoding;
  server_encoding
-
  UTF8
(1 ligne)


I suspect something to do with locales on Debian? The good server (primary) is 
an OVH hosted machine, which runs a debian version that they customize, while 
the bad one (backup) was built using stock debian net-install. I found a 
difference in the LANGUAGE environnement variable (with that strange fr_FR:fr), 
other than that all configuration files are identical on both machines.

cat /etc/default/locale
#Primary
LANG=fr_FR@euro
LANGUAGE=fr_FR:fr

#Backup
LANG=fr_FR@euro



--
Ron Savage
savage.net.au


Re: DSN retrievable from DBI?

2014-03-07 Thread Ron Savage

Hi Vincent

On 07/03/14 21:17, Vincent Veyron wrote:

On Fri, 07 Mar 2014 17:57:26 +1100
Ron Savage r...@savage.net.au wrote:



Is it possible to get back from DBI, or (preferably) $dbh, the DSN used
in the call to connect?



You can retrieve the db and username with this :

http://search.cpan.org/dist/DBI/DBI.pm#Database_Handle_Attributes


Yes, that gives me Username, and uc $username gives me the Oracle 
schema, as I understand it.


$many x $thanx;


--
Ron Savage
savage.net.au


DSN retrievable from DBI?

2014-03-06 Thread Ron Savage

Hi

Is it possible to get back from DBI, or (preferably) $dbh, the DSN used 
in the call to connect?


This would help simplify some code a little bit, which takes both $dbh 
and a schema as parameters.


--
Ron Savage
savage.net.au


Re: PostgreSQL driver DBD::Pg releases version 3.0.0

2014-02-09 Thread Ron Savage

Hi David

On 08/02/14 03:45, David E. Wheeler wrote:

On Feb 7, 2014, at 3:59 AM, Peter J. Holzer h...@wsr.ac.at wrote:


o Decoding incoming data
$$item{$_} = decode('utf-8', $$item{$_} || '') for keys %$item


Same here. With pg_enable_utf8 I would expect to get character strings,
not byte strings, so no decode should be necessary.


Yes, true.

More: http://savage.net.au/Ron/html/Debian.MariaDB.Perl.DBD.mysql.html

The demo uses MySQL, Pg and SQLite.


With 3.0.0, if you have your client_encoding set to UTF-8, you can delete the 
call to pg_enable_utf8 and it will DTRT.


I did not try that.


This has been a long time coming, but most welcome.


Indeed.

--
Ron Savage
http://savage.net.au/


Re: PostgreSQL driver DBD::Pg releases version 3.0.0

2014-02-07 Thread Ron Savage

Hi Peter

I've written a demo using MySQL and will shortly expand it to Pg and 
SQLite, and then blog about it, either on this list or blogs.perl.org.


It stores a string in both encoded and unencoding forms, and retrieves it.


On 07/02/14 22:59, Peter J. Holzer wrote:

On 2014-02-06 12:30:15 +1100, Ron Savage wrote:

'Major change in UTF-8 handling' is right. I was:


I haven't checked the docs yet, just my gut feeling how it should work.



o Declaring the Pg db as utf8


I guess this means setting pg_enable_utf8?



o Encoding outgoing data
Eg: map{($_ = encode('utf-8', $$hashref{$_}) )} keys %$hashref


That seems superfluous to me.

If you set pg_enable_utf8 I would expect the DBD to translate between
perl character strings (aka 'utf8 strings', but you aren't supposed to
know that and in newer perls the difference shouldn't matter any more)
and whatever encoding the database expects.



o Decoding incoming data
$$item{$_} = decode('utf-8', $$item{$_} || '') for keys %$item


Same here. With pg_enable_utf8 I would expect to get character strings,
not byte strings, so no decode should be necessary.

 hp



--
Ron Savage
http://savage.net.au/


Re: DBI doc buglet

2014-02-06 Thread Ron Savage

Hi Tim

On 06/02/14 23:53, Tim Bunce wrote:

On Thu, Feb 06, 2014 at 02:22:35PM +1100, Ron Savage wrote:

Hi

Under connect(), 9 lines down, the text '(i.e., the $data_source prefix
is dbi::)' should only have 1 colon.


You mean here?:
https://github.com/perl5-dbi/dbi/blob/3b5b5a5f3ab4797f3e85d2f0ee244897ad47377a/DBI.pm#L2675


Correct.


 If just the driver_name part is empty (i.e., the $data_source prefix
 is dbi::), the environment variable DBI_DRIVER is used.

I think it's correct as-is. There's no driver_name between the two colons.


Ahh. My mistake of course.

--
Ron Savage
http://savage.net.au/


Re: PostgreSQL driver DBD::Pg releases version 3.0.0

2014-02-06 Thread Ron Savage

Hi Tim

On 06/02/14 23:48, Tim Bunce wrote:

On Thu, Feb 06, 2014 at 12:30:15PM +1100, Ron Savage wrote:


Eg: map{($_ = encode('utf-8', $$hashref{$_}) )} keys %$hashref
$$item{$_} = decode('utf-8', $$item{$_} || '') for keys %$item


Performance tip: using the function form of encode() and decode()
is significantly slower than using the method call form:

 $utf8_encoding-decode($$item{$_} || ''):


So, first call my($utf8_encoding) = find_encoding('utf-8'), eh?

$many x $thanx;


And each module tested under V 3.0.0 broke.

But a 1-line change fixes them:

$$attr{pg_enable_utf8}= 0 if ($$config{dsn} =~ /dbi:Pg/i);


Sweet.


Gotta love utf8.


:)

Tim.



--
Ron Savage
http://savage.net.au/


DBI doc buglet

2014-02-05 Thread Ron Savage

Hi

Under connect(), 9 lines down, the text '(i.e., the $data_source prefix
is dbi::)' should only have 1 colon.

--
Ron Savage
http://savage.net.au/


Parsing Oracle spool output

2009-10-27 Thread Ron Savage
Hi Folks

I've been doing my own parsing of Oracle's spool output, but I have a
feeling I've seen a module on CPAN to do this.

Can anyone remember it's name?

TIA.
-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: persistent dbi handles

2009-10-21 Thread Ron Savage
Hi Alexander

On Wed, 2009-10-21 at 17:53 +0200, Alexander Foken wrote:
 John Scoles wrote:
  Yes there are a number of ways to do this.
  If you are using apache web server they simply do
 
  use Apache::DBI;
 
 Hmm, that helps with mod_perl, but not with CGIs (which are still 
 commonly used with Apache). FastCGI / mod_fastcgi can also profit from 
 persistent connections, but you have to manage them yourself.

Hmm, has anybody tried Apache::BabyConnect?

I did a search on CPAN for 'persistent'.
-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Does Pg's psql have an equivalent to Oracle's spool cmd?

2009-10-20 Thread Ron Savage
Hi Folks

If it does, I can't see it in the Ref Man # 1.

Any ideas?

-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: Does Pg's psql have an equivalent to Oracle's spool cmd?

2009-10-20 Thread Ron Savage
Hi Folks

On Tue, 2009-10-20 at 09:22 +0100, Lesley B wrote:
 On Tue, Oct 20, 2009 at 07:08:08AM -, dbi-users-digest-h...@perl.org 
 wrote:
  Subject: Does Pg's psql have an equivalent to Oracle's spool cmd?

$many x $thanx to those who replied.

I gather the plan is to output the SQL to a table, and then use copy to
xfer the table's data to a file...

-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: Does Pg's psql have an equivalent to Oracle's spool cmd?

2009-10-20 Thread Ron Savage
Hi Tim

On Tue, 2009-10-20 at 17:35 +0800, Tim Bowden wrote:
 On Tue, 2009-10-20 at 11:00 +0200, Peter J. Holzer wrote:
  On 2009-10-20 15:54:30 +0800, Tim Bowden wrote:
   On Tue, 2009-10-20 at 18:07 +1100, Ron Savage wrote:
[snip]
 If all you want to do is get the raw data from a query into a file then
 copy is a handy and simple solution (which may or may not fit the
 original problem).

I don't need to SQL. I am already discarding it when parsing Oracle's
output to get the column headings, their widths, and then the data.

So now with \o I'll be able to do the same with Postgres.

Thanx for the discussion.

-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: ANNOUNCE: DBD::CSV 0.25

2009-10-15 Thread Ron Savage
Hi

On Thu, 2009-10-15 at 10:58 +0200, H.Merijn Brand wrote:
 [snip]

  
 * Raised minimum perl version to 5.005_03
 * Requires Text::CSV_XS 0.43 (needs eof () method and
   error_diag ()) (RT#33764)

What do we do when a compiler is not available?

Does it automatically fall back to pure Perl?

-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: CGI::Sessions with MSSQL DB

2009-10-08 Thread Ron Savage
Hi John

On Thu, 2009-10-08 at 07:08 -0400, John Scoles wrote:
 A little off topic yes but here is my 5cents worth anyway
 
 I would go with
 
 http://search.cpan.org/~rsoliv/Session-0.01/Session.pm
 
 which is a wrapper for CGI::Session  which hides all the nasty details 
 for you.

Err, Around Apache::Session...


 All you need to do is make sure you can connect to your DB and bob is 
 you uncle.

Actually, Bob really is my uncle.


 I use it for example to hold the session info for a web sited with a 
 MySQL back end on an oracle DB.
 
 Cheers
 John Scoles
 
 
 
 pmu...@berkeley.edu wrote:
  Hello,
 
  I'm not to sure if this is the right place to write this to but here it
  goesI'm fairly new to perl and I'm trying to add CGI::Sessions to an
  application written in perl (on FreeBsd) that writes to a MSSQL database. 
  Currently it uses the sybase.pm to connect to the database but how can i
  go about storing sessions information on the mssql database? What driver
  do you suggest i use to accomplish this(ODBC)?  Any advise would be great.
 
  Thank you
  -pm
 

 
-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




[Fwd: Re: CGI::Sessions with MSSQL DB]

2009-10-07 Thread Ron Savage
Hi List

Grrr. Stupid list manager s/w does not default Reply to list...

 Forwarded Message 
 From: Ron Savage r...@savage.net.au
 To: pmu...@berkeley.edu
 Subject: Re: CGI::Sessions with MSSQL DB
 Date: Thu, 08 Oct 2009 12:01:43 +1100
 
 Hi
 
 On Wed, 2009-10-07 at 11:24 -0700, pmu...@berkeley.edu wrote:
  Hello,
  
  I'm not to sure if this is the right place to write this to but here it
  goesI'm fairly new to perl and I'm trying to add CGI::Sessions to an
  application written in perl (on FreeBsd) that writes to a MSSQL database. 
  Currently it uses the sybase.pm to connect to the database but how can i
  go about storing sessions information on the mssql database? What driver
  do you suggest i use to accomplish this(ODBC)?  Any advise would be great.
 
 Try the CGI::Session mailing list:
 
 https://lists.sourceforge.net/lists/listinfo/cgi-session-user
 
 If you app is written using CGI::Application, you'll want this module:
 
 http://search.cpan.org/~ceeshek/CGI-Application-Plugin-Session-1.03/
 
-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: Problem compiling DBI with Perl 5.10.0

2009-08-14 Thread Ron Savage
Hi Folks

On Thu, 2009-08-13 at 18:37 +1000, Ron Savage wrote:
 Hi Folks
 
 With Perl v 5.10.0, I get the same msg as with BerkeleyDB:
 
 make: *** No rule to make target
 `/opt/eHealth/custom/perl/lib/5.10.0/sun4-solaris-thread-multi/CORE/thrdvar.h',
  needed by `DBI.o'
 
 Any ideas?

Yep. PERL5LIB was pointing to a pervious Perl's lib dir containing about
20 modules.

-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: Problem compiling Perl's BerkeleyDB

2009-08-14 Thread Ron Savage
On Wed, 2009-08-12 at 19:38 +1000, Ron Savage wrote:
 Hi Folks
 
 With Perl v 5.10.0, compiled both for threads and without, I get:
 
 make: *** No rule to make target
 `/opt/eHealth/custom/perl/lib/5.10.0/sun4-solaris-thread-multi/CORE/thrdvar.h',
  needed by `BerkeleyDB.o'
 
 Any ideas?

Yep. As with DBI, PERL5LIB pointing to a previous Perl's lib was the
problem.

However, after fixing that, I got undefined symbol clock_gettime.

Perl 5.10.0 comes with Time::HiRes 1.9711. I upgraded to 1.9719, but
that did not fix the problem.

-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Problem compiling Perl's BerkeleyDB

2009-08-12 Thread Ron Savage
Hi Folks

With Perl v 5.10.0, compiled both for threads and without, I get:

make: *** No rule to make target
`/opt/eHealth/custom/perl/lib/5.10.0/sun4-solaris-thread-multi/CORE/thrdvar.h', 
needed by `BerkeleyDB.o'

Any ideas?

-- 
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




RE: DBD-Oracle 1.23 testing

2009-06-25 Thread Ron Savage
Hi Folks

Jeff Urlwin has sent me the results he mentioned, for those of us who
can't see the attachment. I've uploaded it:

http://savage.net.au/SQL/dbd.oracle.1.23.html

--
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html




Re: Error in installing perl DBI Module on sun 0s box

2008-11-15 Thread Ron Savage
Hi

 Perl 5.008001 required--this is only version 5.00503, stopped at
 Makefile.PL line 10.

Upgrade Perl, just as the message suggests.

But don't install V 5.8. Go straight to V 5.10.

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DBI make fatal error: Command failed for target `Perl.o'

2008-11-08 Thread Ron Savage
Hi Cindy

 cc -c-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8
 -D_TS_ERRNO -xO3 -xspace -xildoff-DVERSION=\1.48\
 -DXS_VERSION=\1.48\ -KPIC
 -I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE  -DDBI_NO_THREADS
 Perl.c
 
 sh: cc: not found

This is saying your shell, sh, has tried to run the C compiler, cc, but
cc was not found.

There are various possibilities:

o cc is installed but not on the $PATH

o cc is not installed

For a fuller discussion, search this list's archives. This topic has
arisen /many/ times.

PS
I'm sorry about Martin's fake response.

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: getting error when add column to table

2008-10-08 Thread Ron Savage
Hi Mike

On Wed, 2008-10-08 at 12:11 -0700, mmccaws2 wrote:
 Hi
 
 I don't understand the error for this statement for SQLITE
 
 $dbh-do(ALTER TABLE new_definition (
 ADD COLUMN loopback TEXT));
 
 here is the error message:
 
 DBD::SQLite::db do failed: near (: syntax error(1) at dbdimp.c line
 271 at ./a
 ddnewdef.pl line 38.
 DBD::SQLite::db do failed: near (: syntax error(1) at dbdimp.c line
 271 at ./a
 ddnewdef.pl line 38.

What happens when you believe the msg, and try:

$dbh-do(ALTER TABLE new_definition
ADD COLUMN loopback TEXT);

 Or is it the case I'll have to delete the table and create the table
 with the new column added.
 
 
 
 
 Also additional question about SQLITE.  I've been developing using
 against a SQLITE db.  I trimmed hundreds of entries out of table and
 the count command returns values shows that the number of entries has
 reduced.  However the file doesn't reduce in size.  Does SQLITE keep
 the last greatest  file size eventhough the table has been trimmed?
 Or is there something else I need to do.

I would not expect it to return space to the OS unless you ran a
specific command.

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DSN corruption using DBD::Pg - Solver

2008-09-26 Thread Ron Savage
Hi Folks

The problem arises after upgrading Postgres but not then recompiling
DBD::Pg.

If using the CPAN shell, use the double-f option:

cpanfforce install DBD::Pg

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DSN corruption using DBD::Pg

2008-09-18 Thread Ron Savage
Hi Folks

Greg has kindly looked at my code, and suggested I need to dig into
Log::Dispatch::DBI. More later.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DSN corruption using DBD::Pg

2008-09-17 Thread Ron Savage
Hi Greg

 It might also help to see that portion of the script. Right now, it's
 still to hard to tell if the second connect is by your script, by some
 weird mod_perl interaction, or something else.

OK. I'll do the trace(10, 'filename') and package the code up tomorrow.
It's 22:28 here now.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DSN corruption using DBD::Pg

2008-09-16 Thread Ron Savage
Disconnection complete
End dbd_db_disconnect
Begin dbd_db_destroy
End dbd_db_destroy
- DESTROY= undef
DESTROY (dbih_clearcom) (dbh 0x97fb138, com 0x97ca270, imp
DBD::Pg::db):
   FLAGS 0x100311: COMSET Warn PrintError PrintWarn AutoCommit 
   PARENT DBI::dr=HASH(0x981dbc8)
   KIDS 0 (0 Active)
dbih_clearcom 0x97fb138 (com 0x97ca270, type 2) done.

-- DBI::END ($@: , $!: )
 disconnect_all DISPATCH (DBI::dr=HASH(0x981db68) rc1/3 @1 g0
ima801 pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 716 via
at /home/ron/scripts/Postgres/test.pg.pl line 0
- disconnect_all for DBD::Pg::dr
(DBI::dr=HASH(0x981db68)~0x981dbc8) thr#978b008
Begin dbd_discon_all
End dbd_discon_all
- disconnect_all= '' at /usr/local/lib/perl/5.10.0/DBI.pm line 716
via  at /home/ron/scripts/Postgres/test.pg.pl line 0
!DESTROY DISPATCH (DBI::dr=HASH(0x981dbc8) rc1/1 @1 g0
ima10004 pid#27814) during global destruction
!   - DESTROY in DBD::_::common for DBD::Pg::dr
(DBI::dr=HASH(0x981dbc8)~INNER) thr#978b008
!   - DESTROY= undef during global destruction
DESTROY (dbih_clearcom) (drh 0x981db68, com 0x98165d0, imp global
destruction):
   FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit 
   PARENT undef
   KIDS 0 (0 Active)
dbih_clearcom 0x981db68 (com 0x98165d0, type 1) done.

!DESTROY DISPATCH (DBI::dr=HASH(0x981db68) rc1/1 @1 g0
ima10004 pid#27814) during global destruction
!DESTROY for DBI::dr=HASH(0x981db68) ignored (inner handle gone)


-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




DSN corruption

2008-09-15 Thread Ron Savage
Hi Folks

OS: Debian.

I just used aptitude to install Postgres V 8.3.3, and recompiled DBD::Pg
V 2.10.3.

From the command line I can connect to Postgres, but via a CGI script or
mod_perl handler I'm getting:

==8==
[Tue Sep 16 10:23:24 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
configured -- resuming normal operations
DBI connect('dbname=contacts','ron',...) failed: FATAL:  Ident
authentication failed for user ron
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm 
line 184
[Dispatch] ERROR: Can't connect to data source '' because I can't work
out what driver to use (it doesn't seem to contain a 'dbi:driver:'
prefix and the DBI_DRIVER env var is not set)
at /usr/local/share/perl/5.10.0/Log/Dispatch/DBI.pm line 31
==8==

Note the DSN has lost the prefix 'dbi:Pg:', so the error msg is correct.

If the mod_perl code uses warn $dsn I get:
dbi:Pg:dbname=contacts, ron, ...
as expected.

If I deliberately corrupt the command line script to use:
my($dbh) = DBI - connect('dbname=contacts', 'ron', '...');
I get the same error msg:

[EMAIL PROTECTED]:~$ perl -I/home/ron/perl.modules/Local-Contacts/lib
~/scripts/Postgres/test.pg.pl
Can't connect to data source 'dbname=contacts' because I can't work out
what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix
and the DBI_DRIVER env var is not set)
at /home/ron/scripts/Postgres/test.pg.pl line 17

Help!?

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DSN corruption

2008-09-15 Thread Ron Savage
Hi Ron

More info...

On Tue, 2008-09-16 at 10:34 +1000, Ron Savage wrote:
 Hi Folks
 
 OS: Debian.
 
 I just used aptitude to install Postgres V 8.3.3, and recompiled DBD::Pg
 V 2.10.3.
 
 From the command line I can connect to Postgres, but via a CGI script or
 mod_perl handler I'm getting:
 
 ==8==
 [Tue Sep 16 10:23:24 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
 OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
 configured -- resuming normal operations
 DBI connect('dbname=contacts','ron',...) failed: FATAL:  Ident
 authentication failed for user ron
 at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm 
 line 184
 [Dispatch] ERROR: Can't connect to data source '' because I can't work
 out what driver to use (it doesn't seem to contain a 'dbi:driver:'
 prefix and the DBI_DRIVER env var is not set)
 at /usr/local/share/perl/5.10.0/Log/Dispatch/DBI.pm line 31
 ==8==

I just rigged the code which constructs the DSN to double up on the prefix:

my($dsn) = dbi:Pg:dbi:Pg:dbname=$database;
return [$dsn, $username, $password];

and now get this:

==8==
[Tue Sep 16 10:58:16 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
configured -- resuming normal operations
DBI connect('dbi:Pg:dbname=contacts','ron',...) failed: invalid
connection option dbi:Pg:dbname
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm 
line 184
[Dispatch] ERROR: Can't connect to data source '' because I can't work
out what driver to use (it doesn't seem to contain a 'dbi:driver:'
prefix and the DBI_DRIVER env var is not set)
at /usr/local/share/perl/5.10.0/Log/Dispatch/DBI.pm line 31
==8==

Is it just me, or is DBD::Pg creating a problem here?
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: Solved: Perl goes away during a MySQL execute call, with NO messages.

2008-09-09 Thread Ron Savage
Hi Ian

 P.S. Thanks to Clive for his Red Hat/Perl post. In the middle of all this I 
 switched hosting services to one that uses CentOS, and I can't believe how 
 slow it is. 

Hmmm. I realize this is not a CentOS-oriented list, but can you tell us
more about this speed issue? I ask because my web hosting company offers
CentOS-based VPS. I haven't adopted it yet, and comments such as yours
scare me...

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: Solved: Perl goes away during a MySQL execute call, with NO messages.

2008-09-09 Thread Ron Savage
Hi Richard

On Tue, 2008-09-09 at 19:37 -0400, Richard Dice wrote:
 Ron,
 
 This has been the talk of the Perl world for the past few weeks.
 Here's a place you can go as a starting point.
 
 http://perlbuzz.com/2008/08/red-hats-patch-slows-down-overloading-in-perl.html
 

Ahh. $many x $thanx;

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: Fwd: Installing DBI using gcc

2008-09-03 Thread Ron Savage
Hi Folks

  I am installing DBI 1.49, since my system has perl 5.6.1. I do not
  have a sun compiler available, nor do I have root authority. I have
  'installed' gcc, however. Seems to me there should be a way to tell
  Makefile.PL to generate a makefile with gcc specific flags, but I am
  having difficulty finding documentation on how to invoke Makefile.PL.
 
 
 There is no easy way to do it.
 
 If you must use GCC, build your own Perl (5.10.0, therefore, not the archaic
 5.6.1), and run with the latest everything.

If you can install your own gcc, then you can install your own Perl :-),
in which case...

  Is Makefile.PL documented anywhere? Is there a way to make it generate
  code for gcc?
 
 
 Substantially - no.

A Perl module's Makefile.PL will /automatically/ Just Work if you are
using Perl compiled under your control.

  Next... Tim has documented in the README:
 
It is best to use a Perl that was built on the system you are
  trying to use and it's also
important to use the same compiler that was used to build the Perl
  you
are using.
 
  Can someone explain to me why the compiled code for DBI needs to match
  the compiler that created perl? Clearly I'm missing something...
 
 
 It is bloody hard work to make it work otherwise.  You may try - but it will
 be far quicker to build Perl and use your newly built Perl than to fix the
 build system so that it uses your compiler when the Perl was not built with
 it.

Besides Jonathan's advice, the central concept is 'binary
compatability', which you can research [1] at your leisure.

[1] That means read up on, not experiment with.

 Tim's advice is sound - I'd estimate 1 hour for rebuilding Perl.  I'd
 estimate 1 week of hair-tearing frustration for trying to hack things so it
 builds with your compiler.  Your second attempt might only be 1 day; after a
 few times, you'll give up, build your own Perl after all, and then wonder
 how you ever conceived of doing otherwise.

Ahh, I see, Jonathan's an optimist...

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: Generic DBI question about backups

2008-06-19 Thread Ron Savage
Hi Curtis

 export to CSV and use DBD::CSV?

Or, as a last resort, use Perl :-) 

http://search.cpan.org/~rsavage/DBIx-Admin-BackupRestore-1.10/

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DBD-ODBC and DBI 1.21

2008-04-25 Thread Ron Savage
Hi J

 'cl' is not recognized as an internal or external command,
 operable program or batch file.

This means you don't have the MS compiler in your PATH. Do you have in
installed at all?

If not, you or someone else will have to compile the module on a
different machine, or you'll have to install it.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




YADT (Yet Another Drawing Tool): DB Designer Fork

2008-03-31 Thread Ron Savage
Hi Folks

(1)
DB Designer Fork

Home: https://sourceforge.net/projects/dbdesigner-fork/

Comments: DB Designer Fork is a fork of fabFORCE's DBDesigner 4

Licence: GPL

OS: Linux, Windows

Supports: Oracle, SQL Server, MySQL and FireBird, and - reportedly -
Postgres via ODBC

(2)
More of the same: http://savage.net.au/Ron/html/drawing-tools.html

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: Script hangs when I add WHERE clause to SQL. Not understanding 'Prepare'?

2008-03-26 Thread Ron Savage
Hi Mark

 If I put a where in the SQL, the script hangs indefinitely.

There's nothing in what you showed us to explain the hang.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




New drawing tool: DeZign for Databases

2008-01-24 Thread Ron Savage
Hi Folks

http://savage.net.au/Ron/html/drawing-tools.html

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: dbd::csv with col_names but insert / delete / update fail

2007-12-31 Thread Ron Savage
On Mon, 2007-12-31 at 00:52 -0800, aclhkaclhk wrote:

Hi Peter

 insert.pl
use DBI;
 $dbh = DBI-connect(DBI:CSV:f_dir=/root/csv/
 db;csv_sep_char=,;csv_quote_char=;csv_eol=\n)
 or die Cannot connect:  . $DBI::errstr;

I suggest you check the double-quotes used in the connect() call.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: Getting all names in mdb

2007-12-08 Thread Ron Savage
On Fri, 2007-12-07 at 11:19 +0900, 田口 浩 wrote:

Hi

 my $dbh = DBI-connect(dbi:ODBC:test, , ,
{RaiseError = 1, AutoCommit = 0, LongReadLen = 409600})
or die $DBI::errstr;
 
 Anyone will teach me how to get all names of tables
 (in test.mdb)?

$sth = $dbh - table_info(undef, undef, '%', 'TABLE');

while ($data = $sth - fetchrow_hashref() )
{
$table_name = $$data{'TABLE_NAME'};
...
}

or

install DBIx::Admin::TableInfo.

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Db design tool: ModelRight

2007-12-02 Thread Ron Savage
Hi Folks

I've updated my design tool list at
http://savage.net.au/Ron/html/drawing-tools.html
to include ModelRight.

Email me if you know of other tools which are appropriate to add to this
list.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Re: DBD::CSV: make test fails

2007-10-17 Thread Ron Savage

Robert Roggenbuck wrote:

Hi Robert

(lip.pl lines 28-34). If I unset the DBI_* variables, DBD::Adabas is not 
used and all DBD::CSV-tests are passing - and finally 'make install' 
succeeds.


I did say in one email that I was not setting these. I was wondering if 
you were. That would explain things.



May be this DBI_* usage should be removed from lib.pl?


I guess it's a problem of experience 'v' documented or undocumented 
defaults... Of course, this makes it hard for beginners :-(.


I hope your problem is now solved.
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: DBD::CSV: make test fails

2007-10-16 Thread Ron Savage

Robert Roggenbuck wrote:

Hi Robert

There they are. I get the message 'YOU ARE MISSING REQUIRED MODULES' 
only if I say just 'perl t/20createdrop.t' - I did not know that I need 
to include 'lib' before executing the tests manually.


That's just to get Perl to look in lib/ in the unpacked distro to find 
DBD::CSV. Of course, if the module is already installed then not doing 
that is testing the previously installed version.


Maybe try deleting any old version and rerunning the tests?

It's 8:30 pm here now. More tomorrow.

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: DBD::CSV: make test fails

2007-10-15 Thread Ron Savage

[EMAIL PROTECTED] wrote:

Hi Robert


This is not much (missing an unnamed module?), but I detected in lip.pl
(located in the same test directory) the code which throws the error
message. There are the prerequisits tested (lines 40-49). But this list
includes DBD::CSV itself! How can this ever work? Besides this DBD::CSV is


How can this ever work, you ask.

Well, look. The '[d]make test' command contains 'blib\lib', which means 
the version of DBD::CSV shipped but not yet installed is looked for in 
'blib\lib', and that makes sense since it is precisely that code which 
is being tested!


C:\perl-modules\DBD-CSV-0.22dmake test
C:\strawberry-perl\perl\bin\perl.exe -MExtUtils::Command::MM -e 
test_harness(0, 'blib\lib', 'blib\arch') t/*.t

t/00base...1.15 at t/00base.t line 15.
t/00base...ok
t/10dsnlistok
t/20createdrop.ok
t/30insertfetchok
t/40bindparam..ok
t/40blobs..ok
t/40listfields.ok
t/40nulls..ok
t/40numrowsok
t/50chopblanks.ok
t/50commit.ok
t/ak-dbd...ok
t/csv..ok
t/dbdadmin.ok
All tests successful.
Files=14, Tests=243,  9 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)

Also, for this I did /not/ define the env vars DBI_DSN, DBI_USER and 
DBI_PASS.



Can't locate DBI object method list_tables via package DBD::Adabas::db
at CSV.dbtest line 94.
So the DBD::CSV problem turns to an DBD::Adabas issue...
But why do I need another DB to test DBD::CSV? This seems to me not
necessary.


Hmmm. Odd. I think you have done something which triggered Jeff Zucker's 
private tests. Don't do that!


--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: DBD::CSV: make test fails

2007-10-15 Thread Ron Savage

Robert Roggenbuck wrote:

Hi Robert

The DBD::Adabas-error comes during the tests t/20createdrop, 
t/30insertfetch, t/40bindparam, and then I stopped going though the 
others. The message is exactly the same in every test. If these are Jeff 
Zucker's private tests, there is something wrong with the package...


I don't think so. You saw the output of my 'dmake test'.

BTW I'm installing V 0.22 here.

I think you need to unpack the distro again, and trace thru the test 
code to see what triggers reference to Adabas on your system. Obviously 
it's not happening here, so there must be something in your set up which 
is triggering this effect.


Keep us informed. It may need to be reported back to Jeff.

Good luck!

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: DBD::CSV: make test fails

2007-10-15 Thread Ron Savage

Robert Roggenbuck wrote:

Hi Robert

Looking at the code and the first error msg you got:
YOU ARE MISSING REQUIRED MODULES: [ ]
makes me suspect the method you are using to test the module.
Are you using 'The Mantra' of standard commands? Something like:

shellgunzip DBD-CSV-0.22.tar.gz
shelltar -xvf DBD-CSV-0.22.tar
shellcd DBD-CSV-0.22
shellperl Makefile.PL
shellmake (or dmake or nmake)
shellperl -I lib t/20createdrop.t

Show us the output of all these commands...
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: DBD::CSV: make test fails

2007-10-13 Thread Ron Savage

Robert Roggenbuck wrote:

Hi Robert


t/20createdrop.dubious
Test returned status 22 (wstat 5632, 0x1600)
DIED. FAILED tests 2-5
Failed 4/5 tests, 20.00% okay


Perhaps it's a permissions problem. Try running this test by itself, and 
find if there is a specific statement (Perl, SQL) which fails.

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: help please

2007-10-02 Thread Ron Savage

Samuel_Zheng wrote:

Hi Sam

Hi, Can Somebody help me?This is my perl scrip:#!/usr/local/bin/perl use 


Sorry, but no. This is a DBI-related mailing list, and for your post to 
be relevant you'd have to tell us what why you think the DBI part of the 
code is the part that's failing.

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: help please

2007-10-02 Thread Ron Savage

Samuel_Zheng wrote:

Hi Sam

The question I asked is not related to dbi. I can't find the place where 
I can post my question. I figured out the problem now. I wonder if 
someone can explain it better. Sorry about that.


I suggest you start at:
http://www.perl.org/community.html

Specifically, 'beginners-cgi - cgi specific help' looks appropriate.

Post your explanation there and ask for feedback.
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: Question that may not have an answer

2007-09-17 Thread Ron Savage

Scott Mohnkern wrote:


Hi Scott


I recall talking to someone about perl having an internal database file


Your Perl should have come with: AnyDBM_File.html

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Another SQL tool: WWW SQL Designer

2007-09-06 Thread Ron Savage

Hi Folks

http://savage.net.au/Ron/html/drawing-tools.html



Another SQL tool: SQL Maestro

2007-09-02 Thread Ron Savage

Hi Folks

http://savage.net.au/Ron/html/drawing-tools.html

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: Another set of DBI docs

2007-08-16 Thread Ron Savage
Hi John

 If someone is interested in adding TiddlyWiki support to
 Pod::Simple::Wiki then start with the boilerplate module

I'll have a look at it now. But, of course, in the spirit of Open Source,
/everybody/ is free to beat me to it...

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: Another set of DBI docs

2007-08-15 Thread Ron Savage
Hi Dean

 http://www.presicient.com/dbidocs

Very nice!

Now all we need is a script, in Perl perhaps, to reformat your work as
TiddlyWiki code so it can be grafted into Tim's site...
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: DBI DBD-ODBC

2007-08-15 Thread Ron Savage
Hi Sam

 Thank you for your input. I was going to try what you told me, but it
 gives
 this to me now:
 CGI Error
 The specified CGI application misbehaved by not returning a complete set
 of
 HTTP headers.

This is not a /new/ error. It just means your program ran long enough to
output an error message to the web server /before/ it output the headers
expected by the web server.

Are you sure you created a system DSN and not a user DSN? After all, the
web server, which is running the script, is probably run under control of
a different user that you are logged in as.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: DBF DBI

2007-07-24 Thread Ron Savage
Samuel_Zheng wrote:

Hi Sam

See http://search.cpan.org/~janpaz/DBD-XBase-0.241/ and its FAQ for a
discussion of Clipper.


Re: Apache -Perl-DBD-Oracle Module Issue - Regd.

2007-07-24 Thread Ron Savage

Prasad, Nagendra wrote:

Hi Nagendra


We were able to get the Apache with SSL enabled with a sample perl and tested it 
successfully.. We were also able to compile the DBI  DBD-Oracle versions 
respectively with Apache without any issues/errors..


When you say '...tested it...', what /exactly/ do you mean by 'it'?


[Mon Jul 23 16:44:29 2007] [error] [client 169.188.205.211] 
install_driver(Oracle) failed: Can't load 
'/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBD/Oracle/Oracle.so' 
for module DBD::Oracle: ld.so.1: dbtest.pl: fatal: 
/data01/oracle/product/10.2.0.1/db_1/lib/libclntsh.so.10.1: wrong ELF class: 
ELFCLASS64 at /usr/local/lib/perl5/5.8.8/sun4-solaris/DynaLoader.pm line 230.


I'll let others deal with the 'wrong ELF class error'.


[Mon Jul 23 16:44:29 2007] [error] [client 169.188.205.211]  at 
/usr/local/apache2/htdocs/dbtest.pl line 15


You can't be serious! Surely you /don't/ have a Perl script in the 
htdocs directory. Why isn't it in the cgi-bin directory?


Also, you did not tell us whether or not you could run this Perl script 
(or any other) from the command line, and successfully connect to Oracle.


--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: DBI and DBF Files

2007-07-19 Thread Ron Savage

Samuel_Zheng wrote:

Hi Samuel

CPAN says: http://search.cpan.org/~janpaz/DBD-XBase-0.241/

I use this module successfully.
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: Efficient scanning of SQL Server 2005 tables?

2007-07-17 Thread Ron Savage

Amos Shapira wrote:

Hi Amos


Our local SQL Server/Windows/C++ guru told me that the standard way we scan
tables causes the server to practically copy the entire result set into a
temporary table on the server before feeding it to the client.


I assume MS are so cynical they do this to deliberately slow down the 
process.



He found a way to avoid this in C++ by some clever direct ODBC hacks on
Windows which make the server practically stream the results to the client
without creating a temporary table.

Is there a way to achieve this with Perl on Linux too?


Well, if you can publish his code here it should be convertible in Perl 
(perhaps with a C++ component). But if the code remain secret, I can't 
see how it can be replicated without being independently created.


--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: DBI V 1.58 Can't exec svnversion under SunOS

2007-07-16 Thread Ron Savage
Hi Tim

 I've checked in a new one that should do the right thing:
 http://svn.perl.org/modules/dbi/trunk/dbixs_rev.pl

Downloads...

518 vusbac001 DBI-1.58 make
/usr/local/bin/perl -MExtUtils::Command -e mkpath blib/lib/DBI
rm -f blib/lib/DBI/Changes.pm
cp Changes blib/lib/DBI/Changes.pm
/usr/local/bin/perl -MExtUtils::Command -e mkpath blib/lib/DBI
rm -f blib/lib/DBI/Roadmap.pm
cp Roadmap.pod blib/lib/DBI/Roadmap.pm
/usr/local/bin/perl dbixs_rev.pl
Skipping regeneration of dbixs_rev.h
...

Looks good to me.

$many x $thanx;

 Tim [just back from vacation]

I'm not envious - mine starts at 3 pm today :-).

-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: Error while installing odbc.pm

2007-07-07 Thread Ron Savage

Rohini Krishnan wrote:

Hi Rohini


E:\Perl\DBD-ODBC-1.13perl makefile.pl


Ahh, Windows.


E:\Perl\DBD-ODBC-1.13make


Err, you have to use nmake or dmake under Windows, right?


--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


DBI V 1.58 Can't exec svnversion under SunOS

2007-07-02 Thread Ron Savage
Hi Tim

278 vusbac001 perl-modules cd DBI-1.58
279 vusbac001 DBI-1.58 perl Makefile.PL
*** Note:
The optional PlRPC-modules (RPC::PlServer etc) are not installed.
If you want to use the DBD::Proxy driver and DBI::ProxyServer
modules, then you'll need to install the RPC::PlServer, RPC::PlClient,
Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
You can install them any time after installing the DBI.
You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
http://search.cpan.org/
http://www.perl.com/CPAN/modules/by-module
http://www.perl.org/CPAN/modules/by-module
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module

Your perl was compiled with gcc (version 3.3.2), okay.
Creating test wrappers for DBI::PurePerl:
t/zvp_01basics.t
[snip]
t/zvp_86gofer_fail.t
Creating test wrappers for DBD::Gofer:
t/zvg_01basics.t
[snip]
t/zvg_86gofer_fail.t
Creating test wrappers for PurePerl  Gofer:
t/zvxgp_01basics.t
[snip
t/zvxgp_86gofer_fail.t
Checking if your kit is complete...
Looks good

I see you're using perl 5.008007 on sun4-solaris, okay.
Remember to actually *read* the README file!
Use  'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.

Writing Makefile for DBI
280 vusbac001 DBI-1.58 make
/usr/local/bin/perl -MExtUtils::Command -e mkpath blib/lib/DBI
rm -f blib/lib/DBI/Changes.pm
cp Changes blib/lib/DBI/Changes.pm
/usr/local/bin/perl -MExtUtils::Command -e mkpath blib/lib/DBI
rm -f blib/lib/DBI/Roadmap.pm
cp Roadmap.pod blib/lib/DBI/Roadmap.pm
/usr/local/bin/perl dbixs_rev.pl
Can't exec svnversion: No such file or directory at dbixs_rev.pl line 5.
Use of uninitialized value in string eq at dbixs_rev.pl line 8.
Neither current directory nor parent directory are an svn working copy
make: *** [dbixs_rev.h] Error 2
281 vusbac001 DBI-1.58 uname -a
SunOS vusbac001 5.9 Generic_118558-34 sun4u sparc SUNW,Sun-Fire-280R

Help!
-- 
Ron Savage
[EMAIL PROTECTED]



Re: Urgent help needed! Trouble getting column names from tables

2007-06-27 Thread Ron Savage
Hi Folks

There are Perl modules designed to solve this problem. One is:

http://search.cpan.org/~rsavage/DBIx-Admin-TableInfo-2.00/

-- 
Ron Savage
[EMAIL PROTECTED]



DBI V 1.58 under Strawberry Perl

2007-06-26 Thread Ron Savage
Hi Tim

All tests are successfult, but I get these warnings:

Perl.c: In function `boot_DBD__Perl':
Perl.c:1180: warning: unknown conversion type character `_' in format
Perl.c:1180: warning: too many arguments for format
DBI.xs: In function `dbih_clearcom':
DBI.xs:1273: warning: unused variable `Perl___notused'
DBI.xs: In function `dbih_get_fbav':
DBI.xs:1449: warning: unused variable `Perl___notused'
DBI.xs: In function `dbih_set_attr_k':
DBI.xs:1641: warning: unused variable `Perl___notused'
DBI.xs:1641: warning: unused variable `Perl___notused'
DBI.xs: In function `dbih_get_attr_k':
DBI.xs:1780: warning: unused variable `Perl___notused'
DBI.xs: In function `dbi_dopoptosub_at':
DBI.xs:2122: warning: unused variable `my_perl'
DBI.xs: In function `log_where':
DBI.xs:2204: warning: unused variable `Perl___notused'
DBI.xs: In function `XS_DBI_dispatch':
DBI.xs:3285: warning: unused variable `Perl___notused'
DBI.c: In function `boot_DBI':
DBI.c:5413: warning: unknown conversion type character `_' in format
DBI.c:5413: warning: too many arguments for format

-- 
Ron Savage
[EMAIL PROTECTED]



Re: 100 levels deep in subroutine calls!

2007-06-19 Thread Ron Savage
Hi Peter

 100 levels deep in subroutine calls!

 Is this strictly a Perl debug error message or is this a generic Perl
 error message?  Is there a way around this limitation?  I saw something
 while searching on the Internet about setting the $DB::deep to a higher
 number.

You can easily test this with a little program which does not use DBI.
Hence, it's not a DBI, nor a debug, specific problem.

I think you'd best assume it's a bug in your code :-).
-- 
Ron Savage
[EMAIL PROTECTED]



Re: RFC: The future of Text::CSV_XS

2007-05-26 Thread Ron Savage

H.Merijn Brand wrote:

Hi


   - given a file, tell it whether it has a header row and if so provide
 a hash-key-style interface on each row per the names in columns of the
 header row


Check the change log for Tie::Handle::CSV. I've recently suggested a 
couple of changes to do with handling heading lines.


--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: RFC: The future of Text::CSV_XS

2007-05-26 Thread Ron Savage

H.Merijn Brand wrote:

Hi


   { fields = { Name = ..., Address = ..., ... },
but I think that would be a huge impact on memory use and also be
quite easy to create yourself in a map {} construct;


Rejecting this option based on memory usage is a specious argument.

Every method call on every object in every program has the potential to 
use memory. So what? The person who makes any such call has to accept 
the consequences of that call.


The other argument in favour of this option is: Why should every 
programmer who needs it have to reinvent such code, potentially 
thousands of times, when you could do it once for all of us in the 
module. And it's not as though the method has to be called - as always, 
no call, no memory usage.


--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: OS X 10.8.4 DBD::mysql build looking for libmysqlclient in wrong place?

2007-05-26 Thread Ron Savage

[EMAIL PROTECTED] wrote:

Hi


installed at
/usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
and NOT at
/usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
where the Dynalodaer is looking for it.


OK, I give up. What's the difference between those 2?

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: RFC: The future of Text::CSV_XS

2007-05-25 Thread Ron Savage

H.Merijn Brand wrote:

Hi


=item Space delimited seperators

Discuss if and how CText::CSV_XS should/could support formats like

   1 , foo , bar , 3.19 ,


If? Definitely. How? Errr...Is it so hard? When? Soon, so we can delete 
specialized code written to deal with this. If you want to see the code 
(which I did /not/ write), email me.

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: ANNOUNCE: DBI 1.55 RC3

2007-05-02 Thread Ron Savage

Hi Tim

OS: WinXP
Perl: 5.8.8 (Strawberry)
CC: GCC 3.4.5
Tests: All tests successful, 26 tests and 289 subtests skipped

OS: Win2K
Perl: 5.8.7
CC: MSC
Tests: All tests successful, 26 tests and 297 subtests skipped

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: data_source syntax

2007-04-25 Thread Ron Savage

Robert Denton wrote:

Hi Robert

A long time ago I captured a couple of URIs at easysoft, which might help:

http://www.easysoft.com/support/kb/kb00097.html

http://www.easysoft.com/support/kb/kb00686.html

HTH
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: data_source syntax

2007-04-24 Thread Ron Savage
Hi Robert

 While connecting to a MSsql database, do you need to pass the uid and
 pwd in the $data_source string as well as in the parameter list for
 the connect call?  For example, are either of these correct:

Errr, what happens when you try both?

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html


Re: [?? Probable Spam] Data Format

2007-04-09 Thread Ron Savage

essential quint wrote:

Hi


I'm still learning DBI, so please dont hit me too hard.  ;)


OK so far.



I've noticed, when capturing form input in multiline text boxes


Now you're talking CGI. Do you realize that?

You probably want to:

o Switch to another mailing list

o Use the 'wrap' option on your text boxes
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


Re: Cannot Install DBD ORacle in Win Xp

2007-03-24 Thread Ron Savage

Samant Kumar wrote:

Hi

TMTOWTDI.

You can get a free Oracle for Windows here:

http://www.oracle.com/technology/software/products/database/xe/index.html

It installs an ODBC driver for use via Perl.

It also installs a web server for administration, at 
http://127.0.0.1:8080/apex


Perhaps that will help with your original problem.
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/


  1   2   3   4   >