CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
What does this error mean?

 



datlaravi
Deleted

Jun 29, 2000, 12:18 PM

Post #1 of 1 (738 views)
What does this error mean? Can't Post

Hi,
I am trying to run a subroutine, and it is giving this error.
Database error text=Implicit conversion from datatype 'VARCHAR' to 'INT' is
not allowed. Use the CONVERT function to run this query.
The subroutine is
sub doUpdate {
@fields = ("overHead","slideProj","tv_Vcr","videoConference","seats");
my $updStr= " ";
my $val =" ";
my $colStr = " ";
$value1 = $query->param('hiddenvalue');
for ($i=0;$i<scalar(@fields);$i++) {
if ($query->param($fields[$i])) {
$val = $query->param($fields[$i]);
$val =~ tr/' //d;
$val = "\'" .$val. "\'" ;
if ($fields[$i] =~ /date_/) {
$val = "to_date($val, \'MMDDYYYY\')";
}
}
else { $val = 'null'; }

$colStr .="$fields[$i]\=$val";
$colStr .= "," if ($i < (scalar(@fields)-1));
}
$updStr ="update ConferenceRooms set $colStr where conferenceRoomId =$value1";
$sybHandle=$syb->prepare($updStr);
$sybHandle->execute() &#0124; &#0124; &writeError('Conference Room cannot be updated');
$rc = $sybHandle->finish();
$message = "<b>Conference Room has been updated</b><p>";
}
Please help me.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives