Solved

Writing out DB2 CLOB strings in ASP/VB

Posted on 2007-12-06
1
1,109 Views
Last Modified: 2008-02-01
How would I write out a CLOB string in ASP/VB?

In JSP, I would be able to maintain it the same was as a VARCHAR field, but in ASP, it would print jibberish.

I would like to do the following:

sql = "SELECT EntryID, DescClob, NormalString FROM tblTest "
Set rs = conn.Execute(sql)
Do Until rs.EOF
  Response.Write rs("DescClob")
  rs.MoveNext
Loop

If DescClob currently has "Hello", the above code will only write out "????o"

Any ideas?
sql = "SELECT EntryID, DescClob, NormalString FROM tblTest "

Set rs = conn.Execute(sql)

Do Until rs.EOF

  Response.Write rs("DescClob")

  rs.MoveNext

Loop

Open in new window

0
Comment
Question by:DJmistral
1 Comment
 
LVL 5

Accepted Solution

by:
ocgstyles earned 50 total points
Comment Utility
Hi,

VBScript doesn't support LOB data.  You'll have to cast it to a varchar to get it to work.
sql = "SELECT EntryID, varchar(DescClob) as DescClob, NormalString FROM tblTest "

Set rs = conn.Execute(sql)

Do Until rs.EOF

  Response.Write rs("DescClob")

  rs.MoveNext

Loop

Open in new window

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now