Firstly, I want to apologise for disturbing you, but I am unsure how to
proceed with this.

Basically, I used a PC for quitre a few years, regularly running perl
scripts to take Lotus Notes data into an Access database, and then produce
various reports from various access databases.
Late last year, I changed to a new PC, running Windows NT4 Service Pack 6A,
with Microsofot Visual Studio 6 SP4, MSDE (aka SQL server) with a mixture
of Office 97 and Office 2000.
 I installed ActiveState Perl, and used ppm to install DBI and DBD-ODBC

I now get out of memory errors after a period of time when executing
queries with anything other than very simple syntax.
I used ppm to remove DBD-ODBC and downloaded the DBD-ODBC from CPAN and
used nmake then nmake test on the same database.
However, my test script fails to find the built code, maybe something else
needs to be done for ActiveState perl?

The guys at ActiveState said they could not help, and suggested I contact
the authors, hence this email.
Would you please suggest a way forward.

My script errors that go ways when I use ppm to install DBD-ODBC
--> Connecting
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC
contains: E:
/Perl/lib E:/Perl/site/lib .) at (eval 1) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: ExampleP, Proxy.

nmake test
E:\Perl\site\lib\DBD-ODBC-1.03>nmake test

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        E:\Perl\bin\perl.exe -Mblib -IE:\Perl\lib -IE:\Perl\lib -e "use
Test::Ha
rness qw(&runtests $verbose); $verbose=0; runtests @ARGV;" t\01base.t
t\02simple
.t t\03dbatt.t t\05meth.t t\07bind.t t\08bind2.t t\09multi.t
t\20SqlServer.t t\3
0Oracle.t
Using E:/Perl/site/lib/DBD-ODBC-1.03/blib
t\01base............ok
t\02simple.........."my" variable $dbh2 masks earlier declaration in same
scope
at t\02simple.t line 183.
t\02simple..........ok
t\03dbatt...........ok, 1/16 skipped: Known to fail using MS Access through
2000

t\05meth............ok
t\07bind............ok
t\08bind2...........skipped: SQLDescribeParam not supported using ACCESS
t\09multi...........skipped: multiple statements not supported using ACCESS
t\20SqlServer.......skipped: Microsoft SQL Server tests not supported using
ACCE
SS
t\30Oracle..........skipped: Oracle tests not supported using ACCESS
All tests successful, 4 tests and 1 subtest skipped.
Files=9, Tests=56,  2 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)

E:\Perl\site\lib\DBD-ODBC-1.03>

perl -V output
Z:\Swift Metrics\perl>perl -V
Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=undef use5005threads=undef useithreads=define
usemultiplicity=def
ine
    useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT -
DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DPERL_MSVCRT_READ
FIX',
    optimize='-O1 -MD -DNDEBUG',
    cppflags='-DWIN32'
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize
=4
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -release
-libpath:"E:/Perl\lib\C
ORE"  -machine:x86'
    libpth="E:\Program Files\Microsoft Visual Studio\VC98\mfc\lib" "E:
\Program F
iles\Microsoft Visual Studio\VC98\lib" "E:\Perl\lib\CORE"
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32
.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib
wsoc
k32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comd
lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib
wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
-libpath:"E:
/Perl\lib\CORE"  -machine:x86'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
PERL_IMP
LICIT_SYS
  Locally applied patches:
        ActivePerl Build 633
  Built under MSWin32
  Compiled at Jun 17 2002 21:33:05
  @INC:
    E:/Perl/lib
    E:/Perl/site/lib
    .

Z:\Swift Metrics\perl>

ppm information
PPM> query DBI
DBI [1.32] Database independent interface for Perl
PPM> query DBD
DBD-ODBC [1.01] ODBC Driver for DBI
PPM>


When I run a stripped down test script, I get
Z:\Swift Metrics\perl>perl "Z:\Swift Metrics\perl\outofmemory.pl"
--> Connecting
--> Connected, preparing SIMPLE query
--> Prepared, Running SIMPLE query
--> Query run, finishing SIMPLE query
--> Connected, preparing query
--> Prepared, Running query
Out of memory!

Z:\Swift Metrics\perl>

Striped down test script
SWIFT SRs is a simple ACCESS database
#
# script to show out of memory
#

use DBI;

# open the database
my $dsn = "dbi:ODBC:SWIFT SRs";
my $user = "";
my $password = "";

print "--> Connecting\n";
my $dbh = DBI->connect($dsn, $user, $password,{ RaiseError => 0, AutoCommit
=> 1 });

print "--> Connected, preparing SIMPLE query\n";
my $thequery = $dbh->prepare(<<END_QUERY);
    SELECT ArchiveName
    FROM Archive;
END_QUERY
print "--> Prepared, Running SIMPLE query\n";
my $rc      = $thequery->execute( );
print "--> Query run, finishing SIMPLE query\n";
$rc   = $thequery->finish( );

print "--> Connected, preparing query\n";
my $thequery = $dbh->prepare(<<END_QUERY);
    SELECT Mid([Archive].[ArchiveName],31) AS File, Symbols.Symbol,
Symbols.RevNum, Revisions.Author, Revisions.Date, Revisions.State
    FROM (Symbols INNER JOIN Archive ON Symbols.ArchId = Archive.ArchId)
INNER JOIN Revisions ON (Symbols.RevNum = Revisions.RevNum) AND
(Symbols.ArchId = Revisions.ArchId)
    ORDER BY Symbols.ArchId;
END_QUERY

print "--> Prepared, Running query\n";
my $rc      = $thequery->execute( );
print "--> Query run, finishing\n";

$rc   = $thequery->finish( );
print "--> Finished, disconnecting\n";

# close the database
$rc  = $dbh->disconnect;
print "--> Disconnected\n";


Regards,
Glyn Williams

SWIFT Configuration Control
Applied Materials UK Ltd
Phone     +44 (0)1403 222557
Fax         +44 (0)1403 222288
Email      [EMAIL PROTECTED]


Reply via email to