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:
#!/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;
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