?
Solved

Writing out DB2 CLOB strings in ASP/VB

Posted on 2007-12-06
1
Medium Priority
?
1,120 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
ocgstyles earned 200 total points
ID: 20424416
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

Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

765 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