Solved

Writing out DB2 CLOB strings in ASP/VB

Posted on 2007-12-06
1
1,117 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 50 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

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

695 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