Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Cannot insert into MS Access Memo field with DBI

by Anonymous Monk
on Mar 15, 2004 at 15:10 UTC ( #336719=note: print w/ replies, xml ) Need Help??


in reply to Re: Cannot insert into MS Access Memo field with DBI
in thread Cannot insert into MS Access Memo field with DBI

It did help - I came across the same problem and found your solution which worked for me also! Cheers, Bill


Comment on Re: Re: Cannot insert into MS Access Memo field with DBI
Re^3: Cannot insert into MS Access Memo field with DBI
by Anonymous Monk on Oct 02, 2007 at 14:40 UTC
    same here... thanks for posting.

      I'm having the same darn problem but the bind_param line isn't helping. This is my code:

      use DBI; $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 +inserted into ## a memo field ... $sth->bind_param( 10, $note, DBI::SQL_LONGVARCHAR ); $sth->execute( 'L1', $secondname, $firstname, $order->{addresses}->{delivery}->{street}, $order->{addresses}->{delivery}->{city}, $order->{addresses}->{delivery}->{county}, $order->{addresses}->{delivery}->{postcode}, $order->{phone}, $order->{email}, $note ) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://336719]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2014-12-19 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (83 votes), past polls