drewbert2000 has asked for the wisdom of the Perl Monks concerning the following question:
Hello! Here is what I am trying to do. I want users of my website to sign my guestbook which has to textarea fields for comments. What I have come to realize is that when I post more than around 256 characters into a Memo field in an MS Access database, it doesn't insert anything (no record at all).
There was a similar post a looong time ago but it doesn't sound like there was any definite solution. I know most people will not be using MS Access, but surely someone else has needed to use it and come across this problem. For your reference, the previous post was:
http://www.perlmonks.com/index.pl?node_id=39296&lastnode_id=3989
Now, for my code:
Notice the three commented fields which I have tried to use with no luck. I would greatly appreciate any comments (and code!) from anyone who has a solution to this. Thank you! Andrew#!/usr/bin/perl use strict; use CGI::Carp qw(fatalsToBrowser); use CGI qw(:all); use CGI; use DBI; my $myCGI = new CGI; print "Content-type: text/html\r\n\r\n"; my $name = $myCGI->param('txtName'); my $email = $myCGI->param('txtEmail'); my $country = $myCGI->param('txtCountry'); my $website = $myCGI->param('txtWebsite'); my $publicmessage = $myCGI->param('txtPublic'); my $privatemessage = $myCGI->param('txtPrivate'); my $dbh = DBI->connect('DBI:ODBC:whatever', 'whatever', 'whatever'); #$dbh->do("set textsize 25000"); #$dbh->{LongReadLen} = 50000; #$dbh->{LongTruncOk} = 1; my $sth = $dbh->prepare(q{ INSERT INTO tblGuestbook (name, email, country, website, publicmessage, privatemessage, IP) values (?,?,?,?,?,?,?) }); $sth->execute($name,$email,$country,$website,$publicmessage,$privateme +ssage,$ENV{REMOTE_ADDR}); $sth->finish; $dbh->disconnect;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Cannot insert into MS Access Memo field with DBI
by simon.proctor (Vicar) on Jan 06, 2002 at 18:37 UTC | |
Re: Cannot insert into MS Access Memo field with DBI
by drewbert2000 (Initiate) on Jan 09, 2002 at 02:51 UTC | |
by Anonymous Monk on Jul 16, 2009 at 14:38 UTC | |
by auntie_anne (Initiate) on Jul 22, 2009 at 18:42 UTC | |
by Anonymous Monk on Mar 15, 2004 at 15:10 UTC | |
by Anonymous Monk on Oct 02, 2007 at 14:40 UTC | |
by rjberry (Novice) on Oct 06, 2008 at 12:59 UTC |
Back to
Seekers of Perl Wisdom