Jeff,

Moved the DBI->trace(9) from before the connect to after and got (a lot) more
output. Trace is attached this time.

My apology.

Tom


Jeff Urlwin wrote:

> Is that all?  Right during the connect?
>
> Jeff
> >
> > Hi,
> >
> > Download and installed MDAC 2.7. ODBC core now at 3.520.7713.0.
> > VFP driver at
> > 6.01.8629.01 which is the current release. Attempted to update
> > VFP driver anyway
> > but got the message "Visual Foxpro ODBC driver setup is not
> > supported on Windows
> > 2000 since it is already installed with the operating system.".
> >
> > Level 9 trace follows.
> >
> > As before, your help is appreciated.
> >
> > Tom
> >
> >
> > C:\Inetpub\wwwroot\EDS2000>testodbc.pl
> >     DBI 1.201-nothread dispatch trace level set to 9
> >     Note: perl is running without the recommended perl -w option
> >     -> DBI->connect(DBI:ODBC:EDS2000, , ****)
> >     -> DBI->install_driver(ODBC) for MSWin32 perl=5.006001 pid=1852 ruid=0
> > euid=0
> >        install_driver: DBD::ODBC version 0.28 loaded from
> > C:/Perl/site/lib/DBD/ODBC.pm
> >     New DBI::dr (for DBD::ODBC::dr, parent=, id=)
> >     dbih_setup_handle(DBI::dr=HASH(0x1df742c)=>DBI::dr=HASH(0x1da6bf8),
> > DBD::ODBC::dr, 0, Null!)
> >     dbih_make_com(Null!, DBD::ODBC::dr, 92)
> >     dbih_setup_attrib(DBI::dr=HASH(0x1da6bf8), Err, Null!)
> > SCALAR(0x1db031c)
> > (already defined)
> >     dbih_setup_attrib(DBI::dr=HASH(0x1da6bf8), State, Null!)
> > SCALAR(0x1db0364)
> > (already defined)
> >     dbih_setup_attrib(DBI::dr=HASH(0x1da6bf8), Errstr, Null!)
> > SCALAR(0x1db0340)(already defined)
> >     dbih_setup_attrib(DBI::dr=HASH(0x1da6bf8), Handlers, Null!)
> > ARRAY(0x1da6b74)
> > (already defined)
> >     dbih_setup_attrib(DBI::dr=HASH(0x1da6bf8), Debug, Null!) 0
> > (already defined)
> >
> >     dbih_setup_attrib(DBI::dr=HASH(0x1da6bf8), FetchHashKeyName,
> > Null!) 'NAME'
> > (already defined)
> >     <- install_driver= DBI::dr=HASH(0x1df742c)
> >     >> connect     DISPATCH (DBI::dr=HASH(0x1df742c) rc1/3 @5 g0
> > a1db49a8) at
> > C:/Perl/site/lib/DBI.pm line 474 via
> > C:\Inetpub\wwwroot\EDS2000\testodbc.pl line
> > 4
> >
> >     -> connect for DBD::ODBC::dr
> > (DBI::dr=HASH(0x1df742c)~0x1da6bf8 'EDS2000' ''
> >
> >  **** HASH(0x1abf0b4))
> >     New DBI::db (for DBD::ODBC::db, parent=DBI::dr=HASH(0x1da6bf8), id=)
> >     dbih_setup_handle(DBI::db=HASH(0x1da6ba4)=>DBI::db=HASH(0x1da6b68),
> > DBD::ODBC::db, 1df7180, Null!)
> >     dbih_make_com(DBI::dr=HASH(0x1da6bf8), DBD::ODBC::db, 92)
> >     dbih_setup_attrib(DBI::db=HASH(0x1da6b68), Err,
> > DBI::dr=HASH(0x1da6bf8))
> > SCALAR(0x1db031c) (already defined)
> >     dbih_setup_attrib(DBI::db=HASH(0x1da6b68), State,
> > DBI::dr=HASH(0x1da6bf8))
> > SCALAR(0x1db0364) (already defined)
> >     dbih_setup_attrib(DBI::db=HASH(0x1da6b68), Errstr,
> > DBI::dr=HASH(0x1da6bf8))
> > SCALAR(0x1db0340) (already defined)
> >     dbih_setup_attrib(DBI::db=HASH(0x1da6b68), Handlers,
> > DBI::dr=HASH(0x1da6bf8)) ARRAY(0x1da6b74) (already defined)
> >     dbih_setup_attrib(DBI::db=HASH(0x1da6b68), Debug,
> > DBI::dr=HASH(0x1da6bf8)) 0
> > (already defined)
> >     dbih_setup_attrib(DBI::db=HASH(0x1da6b68), FetchHashKeyName,
> > DBI::dr=HASH(0x1da6bf8)) 'NAME' (already defined)
> > Driver connect 'EDS2000', '', ''
> >
> > Jeff Urlwin wrote:
> >
> > > You probably are not doing anything wrong, but check your
> > driver.  Microsoft
> > > has the MDAC 2.7 out, I believe and that may have a more up to
> > date driver.
> > >
> > > Your SQL statement is pretty plain vanilla.  If updating your
> > driver doesn't
> > > work, set the tracing level to 9 and post here.
> > >
> > > Thanks,
> > >
> > > Jeff
> > > >
> > > > Hi,
> > > >
> > > > I'm a Perl Newbie and I'm having problems trying to use DBD with my
> > > > Visual Foxpro free tables on Win2K. Here is the code:
> > > >
> > > > use DBI;
> > > > #$dbh = DBI->connect('DBI:ODBC:ESLMI04','sa','price'); # SQL 6.5
> > > > works!!!
> > > > $dbh = DBI->connect('DBI:ODBC:EDS2000','','') or
> > > >  die $DBI::errstr; ; # Visual Foxpro free table,
> > > > $sqlstatement="SELECT * FROM areatype";
> > > > $sth = $dbh->prepare($sqlstatement);
> > > > $sth->execute ||
> > > >       die "Could not execute SQL statement ... maybe invalid?";
> > > >
> > > > while (@row=$sth->fetchrow_array)
> > > >  { print "@row\n" };
> > > >
> > > > #$dbh->disconnect;
> > > >
> > > > It retrieves the data but I'm getting a message box "The
> > instruction at
> > > > 0x...(changes each execution) referenced memory at 0x0000004. Memory
> > > > could not be written. Click on OK to terminate the program, click on
> > > > CANCEL to debug the program."
> > > >
> > > > I created an identical table on M$ SQL Server 6.5 and it seems to work
> > > > fine.
> > > >
> > > > Win2K Pro SP2, ODBC core version 3.520.7430.0, VFP driver
> > 6.01.8629.01,
> > > > DBD-ODBC 0.28, DBI 1.201
> > > >
> > > > What am I doing wrong?
> > > >
> > > > Any and all help is most appreciated!!!
> > > >
> > > >
> >
> >

C:\Inetpub\wwwroot\EDS2000>testodbc.pl
    DBI 1.201-nothread dispatch trace level set to 9
    Note: perl is running without the recommended perl -w option
    >> prepare     DISPATCH (DBI::db=HASH(0x1da6bf4) rc1/1 @2 g0 a1db83bc) at C:
\Inetpub\wwwroot\EDS2000\testodbc.pl line 6
    -> prepare for DBD::ODBC::db (DBI::db=HASH(0x1da6bf4)~0x1da6b28 'SELECT * FR
OM areatype')
    New DBI::st (for DBD::ODBC::st, parent=DBI::db=HASH(0x1da6b28), id=)
    dbih_setup_handle(DBI::st=HASH(0x1da6c18)=>DBI::st=HASH(0x1da6cd8), DBD::ODB
C::st, 1da6c24, Null!)
    dbih_make_com(DBI::db=HASH(0x1da6b28), DBD::ODBC::st, 164)
    dbih_setup_attrib(DBI::st=HASH(0x1da6cd8), Err, DBI::db=HASH(0x1da6b28)) SCA
LAR(0x1db0328) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x1da6cd8), State, DBI::db=HASH(0x1da6b28)) S
CALAR(0x1db0370) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x1da6cd8), Errstr, DBI::db=HASH(0x1da6b28))
SCALAR(0x1db034c) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x1da6cd8), Handlers, DBI::db=HASH(0x1da6b28)
) ARRAY(0x1da6bb8) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x1da6cd8), Debug, DBI::db=HASH(0x1da6b28)) 0
 (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x1da6cd8), FetchHashKeyName, DBI::db=HASH(0x
1da6b28)) 'NAME' (already defined)
    dbd_st_prepare'd sql f31660224
        SELECT * FROM areatype
    <- prepare= DBI::st=HASH(0x1da6c18) at C:\Inetpub\wwwroot\EDS2000\testodbc.p
l line 6
    >> execute     DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g0 a1db25a8) at C:
\Inetpub\wwwroot\EDS2000\testodbc.pl line 7
    -> execute for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
    dbd_st_execute (for sql f31660224 after)...
    dbd_describe sql 31660224: num_fields=2
      col  1: CHAR     len=  2 disp=  3, prec=  2 scale=0
      col  2: CHAR     len= 40 disp= 41, prec= 40 scale=0
      col  1: 'areatype' sqltype=CHAR, ctype=SQL_C_CHAR, maxlen=3
      col  2: 'areatyname' sqltype=CHAR, ctype=SQL_C_CHAR, maxlen=41
    <- execute= -1 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 7
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
    dbih_setup_fbav for 2 fields => 0x1da6b94
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '01' 'State                                   ' ) [2 it
ems] row1 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
01 State
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '02' 'Metropolitan Statistical Area (MSA)     ' ) [2 it
ems] row2 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
02 Metropolitan Statistical Area (MSA)
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '03' 'SDA                                     ' ) [2 it
ems] row3 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
03 SDA
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '04' 'County                                  ' ) [2 it
ems] row4 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
04 County
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '05' 'Minor Civil Division                    ' ) [2 it
ems] row5 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
05 Minor Civil Division
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '06' 'BLS Region                              ' ) [2 it
ems] row6 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
06 BLS Region
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '07' 'Broad Geographic Areas (BGA)            ' ) [2 it
ems] row7 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
07 Broad Geographic Areas (BGA)
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '08' 'Economic Development Region             ' ) [2 it
ems] row8 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
08 Economic Development Region
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '09' 'Planning Regions                        ' ) [2 it
ems] row9 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
09 Planning Regions
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '10' 'Labor Market                            ' ) [2 it
ems] row10 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
10 Labor Market
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '11' 'Cities                                  ' ) [2 it
ems] row11 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
11 Cities
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '12' 'Town                                    ' ) [2 it
ems] row12 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
12 Town
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '13' 'Township                                ' ) [2 it
ems] row13 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
13 Township
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '14' 'Municipality/Suburb                     ' ) [2 it
ems] row14 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
14 Municipality/Suburb
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '15' 'Workforce Investment Region             ' ) [2 it
ems] row15 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
15 Workforce Investment Region
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '16' 'One Stop Area                           ' ) [2 it
ems] row16 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
16 One Stop Area
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '17' 'Workforce Development Area              ' ) [2 it
ems] row17 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
17 Workforce Development Area
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '18' 'Job Center Area                         ' ) [2 it
ems] row18 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
18 Job Center Area
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 0
fetch num_fields=2
fetch col#0 areatype datalen=2 displ=3
fetch col#1 areatyname datalen=40 displ=41
    <- fetchrow_array= ( '30' 'Balance of State                        ' ) [2 it
ems] row19 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 11
30 Balance of State
    >> fetchrow_array DISPATCH (DBI::st=HASH(0x1da6c18) rc1/1 @1 g1 a0) at C:\In
etpub\wwwroot\EDS2000\testodbc.pl line 11
    -> fetchrow_array for DBD::ODBC::st (DBI::st=HASH(0x1da6c18)~0x1da6cd8)
       SQLFetch rc 100
       SQLGetFunctions - supported: 1
    <- fetchrow_array= ( ) [0 items] row19 at C:\Inetpub\wwwroot\EDS2000\testodb
c.pl line 11
    >> disconnect  DISPATCH (DBI::db=HASH(0x1da6bf4) rc1/2 @1 g0 a1db7468) at C:
\Inetpub\wwwroot\EDS2000\testodbc.pl line 15
    -> disconnect for DBD::ODBC::db (DBI::db=HASH(0x1da6bf4)~0x1da6b28)
    <- disconnect= 1 at C:\Inetpub\wwwroot\EDS2000\testodbc.pl line 15
    -- DBI::END
    >> disconnect_all DISPATCH (DBI::dr=HASH(0x1df742c) rc1/4 @1 g0 a1db4f24) at
 C:/Perl/site/lib/DBI.pm line 534 via C:\Inetpub\wwwroot\EDS2000\testodbc.pl lin
e 0
    -> disconnect_all for DBD::ODBC::dr (DBI::dr=HASH(0x1df742c)~0x1da6c3c)
    <- disconnect_all= '' at C:/Perl/site/lib/DBI.pm line 534 via C:\Inetpub\www
root\EDS2000\testodbc.pl line 0
    >> DESTROY     DISPATCH (DBI::st=HASH(0x1da6cd8) rc1/1 @1 g0 a0) during glob
al destruction
    -> DESTROY for DBD::ODBC::st (DBI::st=HASH(0x1da6cd8)~INNER)

C:\Inetpub\wwwroot\EDS2000>

C:\Inetpub\wwwroot\EDS2000>

Reply via email to