Board index » delphi » Oracle CLOB ADO problem

Oracle CLOB ADO problem

Using ADO, I created a table in an Oracle database.
The table contains varchar2 types, number types, two CLOB fields.  My
application runs against MS SQL, Oracle 8/9 and Access using ADO.
In my app, the CLOB fields are intended to be the Oracle version of MSSQL's
text and Access's memo field.  Lot's of chars.
Well, I put some data in the field, say 200 chars.  I then read it back.
It's corrupted.  After the first 100 or so chars, the text seems to be
rearranged or something.  (I am accessing the field ".asString")

Now, when I access the data using SQLPlus, (an Oracle tool) it is stored
just fine, so its not a problem with the creation of the table or with the
insert code.

I've seen some switches somewhere that have to do with "forcing retrieval of
entire long string fields".  Don't know if that applies here...

Any ideas?

thanks,

-pete

--

Pete d'Oronzio
Pd' Programming, Inc
"Where Magic Happens"
http://www.pdmagic.com

 

Re:Oracle CLOB ADO problem


You could try to access this content with

MyVar := ADOQUERY.FiledByName('MyField').Value;
or
MyVar := ADOTABLE.FiledByName('MyField').Value;

"Pete d'Oronzio" <myfirstn...@pdmagic.com> a crit dans le message de news:
3e8cba7...@newsgroups.borland.com...

Quote
> Using ADO, I created a table in an Oracle database.
> The table contains varchar2 types, number types, two CLOB fields.  My
> application runs against MS SQL, Oracle 8/9 and Access using ADO.
> In my app, the CLOB fields are intended to be the Oracle version of
MSSQL's
> text and Access's memo field.  Lot's of chars.
> Well, I put some data in the field, say 200 chars.  I then read it back.
> It's corrupted.  After the first 100 or so chars, the text seems to be
> rearranged or something.  (I am accessing the field ".asString")

> Now, when I access the data using SQLPlus, (an Oracle tool) it is stored
> just fine, so its not a problem with the creation of the table or with the
> insert code.

> I've seen some switches somewhere that have to do with "forcing retrieval
of
> entire long string fields".  Don't know if that applies here...

> Any ideas?

> thanks,

> -pete

> --

> Pete d'Oronzio
> Pd' Programming, Inc
> "Where Magic Happens"
> http://www.pdmagic.com

Re:Oracle CLOB ADO problem


Sorry for taking so long to respond.  I may try that in the future, but for
right now, I changed my field types to varchar2.  Since my code is expecting
a string from the clob, it would be a hassle to rewrite a bunch of stuf to
convert it from whatever the .value type returns.

Thanks for your response!

-pete

Quote
"Alain962" <a...@leaweb.org> wrote in message

news:3e8cbe2b@newsgroups.borland.com...
Quote
> You could try to access this content with

> MyVar := ADOQUERY.FiledByName('MyField').Value;
> or
> MyVar := ADOTABLE.FiledByName('MyField').Value;

> "Pete d'Oronzio" <myfirstn...@pdmagic.com> a crit dans le message de
news:
> 3e8cba7...@newsgroups.borland.com...
> > Using ADO, I created a table in an Oracle database.
> > The table contains varchar2 types, number types, two CLOB fields.  My
> > application runs against MS SQL, Oracle 8/9 and Access using ADO.
> > In my app, the CLOB fields are intended to be the Oracle version of
> MSSQL's
> > text and Access's memo field.  Lot's of chars.
> > Well, I put some data in the field, say 200 chars.  I then read it back.
> > It's corrupted.  After the first 100 or so chars, the text seems to be
> > rearranged or something.  (I am accessing the field ".asString")

> > Now, when I access the data using SQLPlus, (an Oracle tool) it is stored
> > just fine, so its not a problem with the creation of the table or with
the
> > insert code.

> > I've seen some switches somewhere that have to do with "forcing
retrieval
> of
> > entire long string fields".  Don't know if that applies here...

> > Any ideas?

> > thanks,

> > -pete

> > --

> > Pete d'Oronzio
> > Pd' Programming, Inc
> > "Where Magic Happens"
> > http://www.pdmagic.com

Other Threads