trace:  

  DBI 1.18-nothread dispatch trace level set to 2
    Note: perl is running without the recommended perl -w option
    -> DBI->connect(dbi:ODBC:Driver=Microsoft Access Driver
(*.mdb);DBQ=c:\progra~1\ipc\pricin~1\maxgen\sxdb1.mdb, Admin, ****)
    -> DBI->install_driver(ODBC) for perl=5.006 pid=289 ruid=0 euid=0
       install_driver: DBD::ODBC version 0.28 loaded from
C:/Perl/site/lib/DBD/ODBC.pm
    <- install_driver= DBI::dr=HASH(0x1ce3164)
    -> default_user in DBD::_::dr for DBD::ODBC::dr
(DBI::dr=HASH(0x1ce3164)~0x1fe57dc 'Admin' undef HASH(0x1b9ee04))
    <- default_user= ( 'Admin' undef ) [2 items] at DBI.pm line 413.
    -> connect for DBD::ODBC::dr (DBI::dr=HASH(0x1ce3164)~0x1fe57dc
'Driver=Microsoft Access Driver
(*.mdb);DBQ=c:\progra~1\ipc\pricin~1\maxgen\sxdb1.mdb' 'Admin' ****
HASH(0x1b9ee04))
Driver connect 'Driver=Microsoft Access Driver
(*.mdb);DBQ=c:\progra~1\ipc\pricin~1\maxgen\sxdb1.mdb', 'Admin', ''
    <- connect= DBI::db=HASH(0x1fe5794) at DBI.pm line 416.
    -> STORE for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER 'PrintError'
1)
    <- STORE= 1 at DBI.pm line 441.
    -> STORE for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER 'AutoCommit'
1)
    <- STORE= 1 at DBI.pm line 441.
    <- connect= DBI::db=HASH(0x1fe5794)
    -> prepare_cached in DBD::_::db for DBD::ODBC::db
(DBI::db=HASH(0x1fe5794)~0x1fe5734 'select cust_co, country from
t_system_data')
2   -> FETCH for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER 'CachedKids')
2   <- FETCH= undef at DBI.pm line 1008.
2   -> STORE for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER 'CachedKids'
HASH(0x1cfd668))
2   <- STORE= 1 at DBI.pm line 1009.
2   -> prepare for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER 'select
cust_co, country from t_system_data' undef)
    dbd_st_prepare'd sql f34023016
        select cust_co, country from t_system_data
2   <- prepare= DBI::st=HASH(0x1fe5884) at DBI.pm line 1021.
    <- prepare_cached= DBI::st=HASH(0x1fe5884) at ESR_PwrReport.pl line 256.
    -> execute for DBD::ODBC::st (DBI::st=HASH(0x1fe5884)~0x1fe577c)
    dbd_st_execute (for sql f34023016 after)...
    dbd_describe sql 34023016: num_fields=2
      col  1: CHAR     len= 32 disp= 33, prec= 32 scale=0
      col  2: SMALLINT len=  2 disp=  7, prec=  5 scale=0
      col  1: 'cust_co' sqltype=CHAR, ctype=SQL_C_CHAR, maxlen=33
      col  2: 'country' sqltype=SMALLINT, ctype=SQL_C_CHAR, maxlen=7
    <- execute= -1 at ESR_PwrReport.pl line 257.
    -> fetchrow_arrayref for DBD::ODBC::st
(DBI::st=HASH(0x1fe5884)~0x1fe577c)
    <- fetchrow_arrayref= [ 'ally7                           ' '8' ] at
ESR_PwrReport.pl line 260.
    -> prepare_cached for DBD::ODBC::db (DBI::db=HASH(0x1fe5794)~0x1fe5734
'select description from t_system_symbols where name_space = "COUNTRY" and
value = ?')
2   -> FETCH for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER 'CachedKids')
2   <- FETCH= HASH(0x1cfd668)1keys at DBI.pm line 1008.
2   -> prepare for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER 'select
description from t_system_symbols where name_space = "COUNTRY" and value =
?' undef)
    dbd_preparse scanned 1 distinct placeholders
    dbd_st_prepare'd sql f34018784
        select description from t_system_symbols where name_space =
"COUNTRY" and value = ?
2   <- prepare= DBI::st=HASH(0x1fe5938) at DBI.pm line 1021.
    <- prepare_cached= DBI::st=HASH(0x1fe5938) at ESR_PwrReport.pl line 256.
    -> execute for DBD::ODBC::st (DBI::st=HASH(0x1fe5938)~0x1fe59b0 8)
bind 1 <== '8' (attribs: )
bind 1 <== 8 (size 1/2/0, ptype 6, otype 1)
    bind 1: CTy=1, STy=VARCHAR, CD=80, Sc=0, VM=1.
    dbd_st_execute (for sql f34018784 after)...
st_execute/SQLExecute error -1 recorded: [Microsoft][ODBC Microsoft Access
Driver] Too few parameters. Expected 3. (SQL-07001)(DBD:
st_execute/SQLExecute err=-1)
    !! ERROR: -1 '[Microsoft][ODBC Microsoft Access Driver] Too few
parameters. Expected 3. (SQL-07001)(DBD: st_execute/SQLExecute err=-1)'
    <- execute= undef at ESR_PwrReport.pl line 257.
    -- DBI::END
    -> disconnect_all for DBD::ODBC::dr (DBI::dr=HASH(0x1ce3164)~0x1fe57dc)
    <- disconnect_all= '' at DBI.pm line 458.
    -> DESTROY for DBD::ODBC::st (DBI::st=HASH(0x1fe577c)~INNER)
    <- DESTROY= undef during global destruction.
    >> DESTROY DBI::db=HASH(0x1fe5734) clearing 2 CachedKids
    -> DESTROY for DBD::ODBC::st (DBI::st=HASH(0x1fe59b0)~INNER)
    <- DESTROY= undef during global destruction.
    -> DESTROY for DBD::ODBC::db (DBI::db=HASH(0x1fe5734)~INNER)
    <- DESTROY= undef during global destruction.
    -> DESTROY in DBD::_::common for DBD::ODBC::dr
(DBI::dr=HASH(0x1fe57dc)~INNER)
    <- DESTROY= undef during global destruction.

I did this, but I didn't see anything of any help...  Maybe someone else
does?

>Hi
>
>Not sure why but Access via ODBC doesn't like double quotes in a query (not
>on the two NT4 boxes I've used it on), see if the following helps 
>
>$statement =qq{select description from t_system_symbols where
> name_space = 'COUNTRY' and value = ?};
>
>Stu

I've also tried this, and it didn't work either.



-----Original Message-----
From: Tim Bunce [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 7:03 PM
To: Brennan, Corey
Cc: [EMAIL PROTECTED]
Subject: Re: prepare_cached statement error???


use trace.

Tim.

On Thu, Jul 19, 2001 at 01:31:50PM -0400, Brennan, Corey wrote:
> Hi all,
> 
> I am having trouble getting a script ported over to NT from Unix.  This
> syntax works on the Unix side but when I try it on NT I get the following
> error:
> 
> DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver]
Too
> few parameters. Expected 3. (SQL-07001)(DBD:st_execute/SQL
> Execute err=-1) at C:\Program
Files\ipc\pricing_tool\maxgen\ESR_PwrReport.pl
> line 257.
> select description from t_system_symbols where name_space = "COUNTRY" and
> value = ? Error
> 
> The code looks like this:
> 
>       $statement =("select description from t_system_symbols where
> name_space = \"COUNTRY\" and value = ?");
>       $row = &get_sql_data($statement, $country_temp);
>       $country = $row->[0];
> 
> sub get_sql_data {
>       
>       my ($stmt, @parm) = @_;
>       
>       my $sth = $dbh->prepare_cached($stmt) or die ("$stmt\n");
>       $sth->execute(@parm) or die ("$stmt Error\n");
>       my $row = $sth->fetchrow_arrayref();
>       undef $sth;
>       
>       return $row;
> }
> 
> Any help would be greatly appreciated.
> 
> Thanks in advance
> ---
> Corey Brennan

Reply via email to