On Sat, Aug 18, 2001 at 04:25:50PM -0700, John Meyer wrote:
> Here's the error message that I am getting:
>
> [911] [2] [0] "[Microsoft][ODBC Driver Manager] Invalid string or buffer
> length"
>
>
> And here is the code
>
>
> my $sqlcommand = "INSERT INTO
> EMAILS(PERSONALITY_ID,EMAIL_HEADER,EMAIL_EMAIL,EMAIL_FROM,EMAIL_SUBJECT)
> VALUES(" . $personalid . ",\"" . $headerlines . "\",\"" . $lines . "\",\""
^
+--- that's not right, is it?
How about something like this:
# sets up a var for sprintf.
my $sql_fmt = qq{insert into emails
( personality_id, email_header, email_email, email_from, email_subject )
values( %s, %s, %s, %s, %s )
};
my $sql = sprintf( $sql_fmt, $personalid, $headerlines, $lines, $from, $subject );
$emails->sql($sql);
--
Any technology distinguishable from magic is insufficiently advanced.
TopQuark Software & Serv. Contract programmer, server bum.
[EMAIL PROTECTED] Give up Spammers; I use procmail.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php