I'm having the same darn problem but the bind_param line isn't helping. This is my code:
$dbh = DBI->connect('dbi:ODBC:driver=microsoft access driver (*.mdb);'
+ . "dbq=$db_path");
my $note = "Order";
$sth = $dbh->prepare("INSERT INTO tblCustomer ( BranchID, LastName, Fi
+rstName, Street, Town,
County, PostCode, PhoneNumber, Email, Note )
SELECT ? AS Expr1, ? AS Expr2, ? AS Expr3, ? AS Expr4, ? AS Expr5, ? A
+S Expr6, ? AS Expr7, ?
AS Expr8, ? AS Expr9, ? AS Expr10;
## MSAccess is a piece of crap so you have to do this to fix anything
## a memo field ...
$sth->bind_param( 10, $note, DBI::SQL_LONGVARCHAR );
) or die "Could not update DB!";
Anyone have a clue? The error message just says that the SQL is improperly formatted, which it does not do if I take out the 'note' line, which is the Memo.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||