in reply to Insert into MSSQL
Warning: I am not doing any error checking, but you might want to look at the RaiseError attribute for the connect statement, and the 'Transactions' section of the DBI docs for idiomatic error handling.my $sth = $dbh->prepare('insert into tblfilm (name, price) values (?,?)'; $sth->execute($FilmName, $Price); #Update: I forgot, 'do' also accepts placeholder arguments like this.. $dbh->do('insert into tblfilm (name, price) values (?,?)', undef, $FilmName, $Price);
|
|---|