in reply to Re^2: inserting and showing data from an MS Access database
in thread inserting and showing data from an MS Access database
Can I use something other than sth?Yes, of course you can. $sth is just a variable name that's generally used in DBI examples. You can use anything you like :)
Just a couple of other quick pointers that may save you some grief further down the track:
my $dbh = DBI->connect("DBI::ODBC ... etc $dsn") or die("Couldn't connect to $dsn: $DBI::errstr\n");
You would do:my $sth = $dbh->prepare("INSERT INTO table VALUES (value1, value2, val +ue3)");
and then later...my $sth = $dbh->prepare("INSERT INTO table VALUES (?, ?, ?)");
$sth->execute($foo, $bar, $baz);
Cheers,
Darren :)
|
|---|