hi

someone able to help me about this? i'm absolulty confused... the Update
will work in EE without any problems, the select, too. what is wrong with
this code? i have tested with ActiveState Perl 5.6.1, DBD-ODBC 0.43 and
1.01. since 1.01 the error message has changed - but i cannot get this
working.

if someone have a good idea how to save mathematical value in a DB field
with commas other than money field - he is very welcome! i have seen many
problems with float if i try to set for e.g. 2.3 - SQL2K makes 2.29999999999
with this... 2.6 gives problems too. i don't know why - but this will break
the app.

additional to this - i found out i can only add values to money fields with
CONVERT - someone able to explain me - why??? is this a DBD-ODBC Bug?


Software error:
Can't rebind placeholder 1 at C:\InetPub\domain\cgi-bin\dir\config.cgi line
221.


my $sth8 = $dbh->prepare("SELECT ISNULL(Test1,'') AS Test1 FROM $dbtable
with (NoLock)");
my $rv8 = $sth8->execute();
while (my $ref8 = $sth8->fetchrow_hashref()) {
 my $name=$ref8->{'Test1'};
        my $level1=param("LEVEL1_$name") || '0';
           $level1=~s/\,/\./i;
           $level1=~s/[^\d.]//i;
        my $level2=param("LEVEL2_$name") || '0';
           $level2=~s/\,/\./i;
           $level2=~s/[^\d.]//i;

        my $sth9 = $dbh->prepare("
                                 UPDATE
                                       $dbtable
                                 SET
                                       Provlevel1=CONVERT(money,?),
                                       Provlevel2=CONVERT(money,?)
                                 WHERE Test1=?
                                ");
        my $rv9=$sth9->execute($level1,$level2,$name); # line 221
        $sth9->finish();
}
$sth8->finish();


Alex


Reply via email to