Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

hallikpapa's scratchpad

by hallikpapa (Scribe)
on Nov 14, 2007 at 06:41 UTC ( #650694=scratchpad: print w/replies, xml ) Need Help??

$SQL = "INSERT INTO iCDRSbw (rec_num,src_file,src_host,init_status,cdr +_day,last_modified,city,state,cname,vname, npa,nxx,ocn,lata,lata_name,pdd,zone_id,cdrs_seq,file_seq,g +c_id ) VALUES (?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?)"; ... ... ... unless ( $sth->execute($rec_num, '$src_cdr_file', '$host','$init_status +', '$f[20]', '$f[04]', '$city', '$state', '$cname', '$vname', $npa, $nxx, '$ocn', $lata, $lata_name, $pdd, $f[0], $f[1], $f[2], '$f[3]' ) ) { $now = localtime(time); print "Error inserting: $DBI::errstr\n" if ($LOGERR); }
My error is
Error inserting: [Microsoft][ODBC SQL Server Driver]Invalid character +value for cast specification (SQL-22018)(DBD: st_execute/SQLExecute e +rr=-1)
Everything but the primary key allows NULL. I have tripled checked the data types. Each variable has a value, whether it's an int or varchar. This mSQL statement just worked, so I am having problems with the perl query.
INSERT INTO iCDRSbw (rec_num,src_file,src_host,init_status,cdr_day,las +t_modified,city,state,cname,vname, npa,nxx,ocn,lata,lata_name,pdd,zone_id,cdrs_seq,file_seq,g +c_id ) VALUES (1,'icdr.5_5_5B.0.1.200712170000.052964.0','127.0.0.1','Unpro +cessed','2007-12-17 00:00:47','2007-12-17 00:00:47','NA','NA',' ',' ' +, 999,999,' ',1,1,1,1,1,1,'AAAAC0dlvAgiIAABC7Przw.7591990');
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2017-04-26 02:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (467 votes). Check out past polls.