Actually, there are quite a few messages about this in the group
archive. Just search for "NULL".
You need to pass the third parameter -- {type => SQL_CHAR} to
bind_param method (see DBI perldoc). Otherwise, the driver
stripps out leading and trailing whitespace.
-----Original Message-----
From: Ronald J Kimball [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 8:37 AM
To: Andreas.Mock
Cc: [EMAIL PROTECTED]
Subject: Re: Problem with inserting NULL values.
On Fri, Aug 01, 2003 at 03:27:47PM +0200, Andreas.Mock wrote:
> 2) preparing insert statement is ok.
> Then, if I provide a null value as 'undef'(sure without quotes)
> to a bind variable the String 'null' gets inserted to the database
> table. But I want a real NULL value. I can't understand this behaviour.
Show us your code. I suspect you are mistakenly combining $dbh->quote()
with placeholders. You should not call $dbh->quote() on a value you are
binding to a placeholder.
Ronald