----- Original Message ----- 
From: "Ron MacNeil" <[EMAIL PROTECTED]>
To: "Dbi-Users" <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 7:56 AM
Subject: Can't insert an empty string with DBD::Informix? Bug?


> Hi all, I'm having difficulty inserting empty strings into a CHAR(10)
> field in my database.
> 
> I'm trying to insert an empty string ('') into a database field.  But in
> every case I get a space (' ') as the value in the table.  Using
> DBD::Informix 1.00.PC1 with DBI 1.20.

You would get the same thing if you inserted using dbaccess, ESQL/C,
or 4GL. 'Empty' (but non-null) CHAR fields in Informix (& other databases?)
are actually all spaces. You cannot store an actual 'empty string' unless
you use a VARCHAR field.

HTH,
Douglas Wilson

Reply via email to