Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP and CLOBs

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
Hi All,

Migrating an app to DB2, having an issue reading / displaying CLOB data with ASP.

Using:
Code:
sql="SELECT ann_id, ann_details FROM announcements Fetch First 1 Rows Only;"
set rsDC=server.CreateObject("ADODB.RecordSet")
with rsDC
 .CursorLocation = 3
 .Open SQL, PortalStDB, 0, 1

If Not rsDC.EOF AND Not rsDC.BOF Then
   ann_Id= rsDC.Fields("ann_id")
   ann_details= rsDC.Fields("ann_details").GetChunk(6000)
End If
End With
set rsDC=nothing

response.write "ann_details="&ann_details& "<BR>"

The code produces nothing but ?????????????? in place of the expected result unless we use the CAST command to alter the CLOB to varchar. Is there another field type to consider using as the data is strictly text?

Is this a character set problem or is there something else I need to look at?

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top