Board index » delphi » Inserting a row in Informix with a TEXT TYPE field

Inserting a row in Informix with a TEXT TYPE field

Does anyone know how I would insert a row into an Informix (maybe other
database would have the same type of problem) database that has a column
defined as a TEXT TYPE?

I just build my SQL statement in Delphi 4.03 and when I run the insert
statement, it comes back with an error stating that I need to use some kind
of Blob type.  Can this even work with a version of Delphi this old?

Thanks,

Craig Madsen
cmad...@cmadsen.com
craig_mad...@albertsons.com

 

Re:Inserting a row in Informix with a TEXT TYPE field


We have an informix table with two attributes of type TEXT.

We don't have any difficulty inserting into it.  We've been doing it since
Delphi 1. (The BDE informix driver wasn't so good back then.)  I looked at
the source code we have and it has been upgraded to D5 so I don't know if we
had to do it differently in D4, but we treat the columns as type ftString
and use the .AsString method of the ParamByName and FieldByName properties
to access it.  Perhaps that's not the proper way to do it, but it works for
us.

I don't have any of the D4 code laying around anymore so I can't tell if we
had to change it.

We are using the BDE.

This is an excerpt of our ddl

CREATE TABLE TblName (
       Key1           char(18) NOT NULL,
       Fld1            text IN ourblobspace NOT NULL,
       Fld2            text IN ourblobspace
)
       IN ourtablespace
;

Also, we are using Informix V.7.???  Perhaps the later versions are more
restrictive.

Best Regards,
Eric W. Carman

Quote
"Craig Madsen" <cmad...@cmadsen.com> wrote in message

news:3cc20ed6_1@dnews...
Quote
> Does anyone know how I would insert a row into an Informix (maybe other
> database would have the same type of problem) database that has a column
> defined as a TEXT TYPE?

> I just build my SQL statement in Delphi 4.03 and when I run the insert
> statement, it comes back with an error stating that I need to use some
kind
> of Blob type.  Can this even work with a version of Delphi this old?

> Thanks,

> Craig Madsen
> cmad...@cmadsen.com
> craig_mad...@albertsons.com

Other Threads