Re: Perl OBDC Segmentation fault



That should be: PERL_DL_NONLAZY=1

(fat fingers or a slow brain, quite possibly both, cause me to make those
kinds of mistakes)


On 10/5/07, Rob Coops <rcoops@xxxxxxxxx> wrote:

Here is one solution that seems to work for me.

Set the following environment variable: PERL_DL_NOnLAZY=1

The explanation as to what it does and why this might work you can fine at
this link: http://www.perl.com/lpt/a/520

Regards,

Rob


On 10/4/07, nickyxu1981@xxxxxxxxx <nickyxu1981@xxxxxxxxx> wrote:

Hi all,
I have a script about query record from MS Access database.
This database contains a table named Lengths.
The list of field names is Sample_ID, Taxon_ID, Lenght.

Question is coming:
1. When I use the query command: select * from Lengths
It works well!
2. When I use the query command: select * from Lengths where Taxon_ID
=1
It gives the following:
18-1-16
23-1-17
23-1-15
23-1-14
24-1-15
Segmentation fault
3. When I use the query command: select * from Lengths where
Sample_ID = 1
The result is :
[hxu@fleetlink msaccess]$ perl test.pl
Segmentation fault

Does anyone meet this problem?
My code is like this:
my $dbh = DBI-> connect( "dbi:ODBC:DSN=mdb1") or die "$DBI::errstr";
my $query = "select * from Lengths";

my $tp=$dbh->prepare("select * from Lengths where Sample_ID = 1") or
die "cna nont $dbh->err $dbh->errstr \n";
$tp->execute();

#print $tp;

while (my @tmp_l=$tp->fetchrow_array())
{ print join('-',@tmp_l),"\n";}

The operating system is Red Hat Enterprise 3.
Perl : v5.8.3 built for i386-linux-thread-multi
ODBC: unixODBC 2.2.12
DBD::ODBC: 1.14

Best Regards,
Xu


--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx
http://learn.perl.org/






Relevant Pages

  • Perl OBDC Segmentation fault
    ... I have a script about query record from MS Access database. ... When I use the query command: select * from Lengths ... When I use the query command: select * from Lengths where Taxon_ID ...
    (perl.beginners)
  • Perl OBDC Segmentation fault
    ... I have a script about query record from MS Access database. ... When I use the query command: select * from Lengths ... When I use the query command: select * from Lengths where Taxon_ID ...
    (perl.beginners)
  • Segmentation fault
    ... I have a script about query record from MS Access database. ... When I use the query command: select * from Lengths ... When I use the query command: select * from Lengths where Taxon_ID ...
    (perl.dbi.users)
  • Re: Perl OBDC Segmentation fault
    ... Segmentation fault ... When I use the query command: select * from Lengths where ... This is hard to debug it via common perl way. ... You may refer this DBI debug document or ask it on DBI mailing list. ...
    (perl.beginners)