Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Is it possible to read the value of NCLOB field in Delphi 2007 ?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Mar 26, 2016 9:26 AM Last Post By: Peter Below
karthik thirumo...

Posts: 23
Registered: 9/26/13
Is it possible to read the value of NCLOB field in Delphi 2007 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 21, 2016 6:31 AM
Hello ,
I'm Using Delphi 2007 & Delphi XE3. When i try to read the value of NCLOB field (oracle) in Delphi 2007 ,i'm getting below ORACLE Error,
Oracle Error: ORA-24806.
Error Description: LOB form mismatch.
But the same is working with Delphi XE3.

Below is the which i'm using,
       qCDS.sqltext := 'SELECT * FROM TempPROPS WHERE NAME = ''axp''';
       qCDS.open;
       sList := TStringList.Create;
       sList.Text := qCDS.fieldbyname('props').asstring;      *//Reading the value of NCLOB field*
     


Is there any way to read the value of NCLOB field in Delphi 2007 ??

Edited by: karthik thirumoorthi on Mar 21, 2016 6:32 AM
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: Is it possible to read the value of NCLOB field in Delphi 2007 ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 21, 2016 11:25 AM   in response to: karthik thirumo... in response to: karthik thirumo...
karthik thirumoorthi wrote:

Hello ,
I'm Using Delphi 2007 & Delphi XE3. When i try to read the value
of NCLOB field (oracle) in Delphi 2007 ,i'm getting below ORACLE
Error, Oracle Error: ORA-24806. *Error Description: LOB
form mismatch.* But the same is working with Delphi XE3.

Below is the which i'm using,
       qCDS.sqltext := 'SELECT * FROM TempPROPS WHERE NAME = ''axp''';
       qCDS.open;
       sList := TStringList.Create;
       sList.Text := qCDS.fieldbyname('props').asstring;
*//Reading the value of NCLOB field*      


Is there any way to read the value of NCLOB field in Delphi 2007?

Does the TField component have a AsWidestring property in D2007? I
don't remember, so just check the help. If it has this property try it
instead of AsString.


--
Peter Below
TeamB

karthik thirumo...

Posts: 23
Registered: 9/26/13
Re: Is it possible to read the value of NCLOB field in Delphi 2007 ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 25, 2016 3:33 AM   in response to: Peter Below in response to: Peter Below
I have tried that one also. still i'm getting the same.

Peter Below wrote:
karthik thirumoorthi wrote:

Hello ,
I'm Using Delphi 2007 & Delphi XE3. When i try to read the value
of NCLOB field (oracle) in Delphi 2007 ,i'm getting below ORACLE
Error, Oracle Error: ORA-24806. *Error Description: LOB
form mismatch.* But the same is working with Delphi XE3.

Below is the which i'm using,
       qCDS.sqltext := 'SELECT * FROM TempPROPS WHERE NAME = ''axp''';
       qCDS.open;
       sList := TStringList.Create;
       sList.Text := qCDS.fieldbyname('props').asstring;
*//Reading the value of NCLOB field*      


Is there any way to read the value of NCLOB field in Delphi 2007?

Does the TField component have a AsWidestring property in D2007? I
don't remember, so just check the help. If it has this property try it
instead of AsString.


--
Peter Below
TeamB

Peter Below

Posts: 1,227
Registered: 12/16/99
Re: Is it possible to read the value of NCLOB field in Delphi 2007 ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 26, 2016 3:47 AM   in response to: karthik thirumo... in response to: karthik thirumo...
karthik thirumoorthi wrote:

I have tried that one also. still i'm getting the same.

I forgot to ask: what data access component set are you using here?
BDE, dbX, dbGo, something 3rd-party? The problem probably sits inside
the Oracle-specific driver part of the access framework, which may lack
proper support for Oracle NCLOB and NVarChar2 types in D2007 (which was
pre-Unicode).
Have you checked which fieldtype the field created for the 'props'
column in your TClientDataset (I assume that is what qCDS is) actually
has? Check the Datatype property of the TField returned by FieldbyName.
It may be ftBlob in D2007 but ftMemo or ftWideMemo in XE3. If it is
ftBlob, cast the field reference to TBlobField and use the SaveToStream
method to copy the raw data to a TMemoryStream. From there you should
have less problems getting the data in the way you need.


Peter Below wrote:
karthik thirumoorthi wrote:

Hello ,
I'm Using Delphi 2007 & Delphi XE3. When i try to read the
value of NCLOB field (oracle) in Delphi 2007 ,i'm getting below
ORACLE Error, Oracle Error: ORA-24806. *Error
Description: LOB form mismatch.* But the same is working
with Delphi XE3.

Below is the which i'm using,
       qCDS.sqltext := 'SELECT * FROM TempPROPS WHERE NAME =
''axp''';        qCDS.open;
       sList := TStringList.Create;
       sList.Text := qCDS.fieldbyname('props').asstring;
*//Reading the value of NCLOB field*      


Is there any way to read the value of NCLOB field in Delphi
2007?

Does the TField component have a AsWidestring property in D2007? I
don't remember, so just check the help. If it has this property try
it instead of AsString.


--
Peter Below
TeamB


--
Peter Below
TeamB

Peter Below

Posts: 1,227
Registered: 12/16/99
Re: Is it possible to read the value of NCLOB field in Delphi 2007 ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 26, 2016 9:26 AM   in response to: karthik thirumo... in response to: karthik thirumo...
karthik thirumoorthi wrote:

I have tried that one also. still i'm getting the same.

I forgot to ask: what data access component set are you using here?
BDE, dbX, dbGo, something 3rd-party? The problem probably sits inside
the Oracle-specific driver part of the access framework, which may lack
proper support for Oracle NCLOB and NVarChar2 types in D2007 (which was
pre-Unicode).
Have you checked which fieldtype the field created for the 'props'
column in your TClientDataset (I assume that is what qCDS is) actually
has? Check the Datatype property of the TField returned by FieldbyName.
It may be ftBlob in D2007 but ftMemo or ftWideMemo in XE3. If it is
ftBlob, cast the field reference to TBlobField and use the SaveToStream
method to copy the raw data to a TMemoryStream. From there you should
have less problems getting the data in the way you need.


Peter Below wrote:
karthik thirumoorthi wrote:

Hello ,
I'm Using Delphi 2007 & Delphi XE3. When i try to read the
value of NCLOB field (oracle) in Delphi 2007 ,i'm getting below
ORACLE Error, Oracle Error: ORA-24806. *Error
Description: LOB form mismatch.* But the same is working
with Delphi XE3.

Below is the which i'm using,
       qCDS.sqltext := 'SELECT * FROM TempPROPS WHERE NAME =
''axp''';        qCDS.open;
       sList := TStringList.Create;
       sList.Text := qCDS.fieldbyname('props').asstring;
*//Reading the value of NCLOB field*      


Is there any way to read the value of NCLOB field in Delphi
2007?

Does the TField component have a AsWidestring property in D2007? I
don't remember, so just check the help. If it has this property try
it instead of AsString.


--
Peter Below
TeamB


--
Peter Below
TeamB

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02