Harpreet Dhaliwal wrote:
> Hi,
>
> I have the following insert statement
>
> insert into abc (a,b,c) values (?,?,?);
>
> when i execute this insert (in perl) i get the following error
>
> Cannot bind a reference (ARRAY(0x925069c)) ((null))
>
> This is because value of column a is defined but null
> So how should in bind null value in my insert statement?
Harpreet,
I don't think there is any special treatment when binding null values. I
suspect there is a bug elsewhere in your code.
I believe this should work:
$dbh->do(
"insert into abc (a,b,c) values (?,?,?)", {}, undef,undef,undef);
Mark