Re: Perl DBI ODBC



John Bokma schrieb:
> Bernd Sandmann <b.sandmann@xxxxxxx> wrote:
>
>
>>Hello,
>>
>>the following Script is crashing under Windows with the Error:
>>
>>---------------------------
>>perl.exe - Fehler in Anwendung
>>---------------------------
>>Die Anweisung in "0x1134030c" verweist auf Speicher in "0x1134030c".
>>Der Vorgang "read" konnte nicht auf dem Speicher durchgeführt werden.
>>Klicken Sie auf "OK", um das Programm zu beenden.
>
>
> Which version of DBI, ODBC, Perl (ActiveState? Other?)
The Versions are:
Perl ActiveState Version 5.8.7 Build 813
DBI 1.48
DBD-ODBC 1.13

i think these are the newest versions. But i have also tested it with different versions of Perl and DBI,ODBC. The error is always the same.

>
>
>>use DBI;
>
>
> A lot of people will complain if you don't use strict and use warnings;
You are right, i haven´t used it because of my decleration errors :-)
The finally script is much longer, so i use this little part only for the testing of the ODBC-Access.
>
>
>>$SQL = "select * from PeriodenumsaetzeSachkonten";
>>
>>my $DSN = "Sage KHK 3.3.3";
>>my $dbh = DBI->connect("dbi:ODBC:$DSN", '','')
>> or die "$DBI::errstr\n";
>>
>>$sth = $dbh->prepare($SQL);
>>$sth->execute() or die "$DBI::errstr\n";
>>
>>$sth->dump_results;
>>
>>$dbh->disconnect;
>>
>>Can someone help me?
>
>
> Try to comment out each line, then turn them on one by one, to find the
> crash point.
>
The error comes after the execution of the prepare Statement.
( $sth = $dbh->prepare($SQL);)
A trace show the folloing:


perl -w test.pl

DBI 1.48-ithread default trace level set to 0x0/1 (pid 1664)
-> DBI->connect(dbi:ODBC:Sage KHK 3.3.3, , ****)
-> DBI->install_driver(ODBC) for MSWin32 perl=5.008007 pid=1664 ruid=0 euid=
0
install_driver: DBD::ODBC version 1.13 loaded from C:/Programme/Perl/site
/lib/DBD/ODBC.pm
<- install_driver= DBI::dr=HASH(0x1b6236c)
<- connect('Sage KHK 3.3.3' '' ...)= DBI::db=HASH(0x1bdf1c4) at DBI.pm line
598
<- STORE('PrintError' 1)= 1 at DBI.pm line 645
<- STORE('AutoCommit' 1)= 1 at DBI.pm line 645
<- STORE('Username' '')= 1 at DBI.pm line 648
<> FETCH('Username')= '' ('Username' from cache) at DBI.pm line 648
<- connect= DBI::db=HASH(0x1bdf1c4)
<- STORE('dbi_connect_closure' CODE(0x1bdf104))= 1 at DBI.pm line 668
<- prepare('select Kontonummer from PeriodenumsaetzeSachkonten')= DBI::st=HA
SH(0x1be8730) at test.pl line 21
<- DESTROY(DBI::st=HASH(1be8730))= undef
<- DESTROY(DBI::db=HASH(1bdf1c4))= undef
<- disconnect_all= '' at DBI.pm line 677
! <- DESTROY(DBI::dr=HASH(1b6236c))= undef during global destruction


The Script crashes always when it is ended. As soon as the
Destroy statements where executed.

Regards Bernd.


.



Relevant Pages

  • Re: Apache, Oracle, Perl DBI Problems
    ... I believe at the start of every perl cgi script interfacing ... 'perl dbi oracle'. ...
    (perl.dbi.users)
  • InterBase MEMO/BLOB fields, data with size > 1MB
    ... my Perl script I have a code part that fetches a data from database ... Scriptwork just fine if the "content" in MEMO or BLOB ... DBD-InterBase with some other Perl module? ... "The DBI currently defines no way to insert or update LONG/LOB values ...
    (perl.dbi.users)
  • RE: Why wont my script terminate?
    ... No, it's not very big--might be kinda ugly to you expert Perl programmers, ... to this list (DBI version 1.14 written by Tim Bunce for MsWin32). ... Here's my script: ... 'TEST_' to output file names.) ...
    (perl.dbi.users)
  • RE: Help with my perl script
    ... over DBI, the capabilities you're asking about concern elementary Perl. ... I am trying to write a load testing script. ... But this script will do one session after another. ...
    (perl.dbi.users)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)