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
Solved

ADO and Oracle CLOBs

Posted on 2006-07-01
6
1,354 Views
Last Modified: 2012-05-05
ok, I have a problem accessing an oracle CLOB from ADO / ASP.
Environment is Windows 2003 Server
I have setup a System DSN named dQA which uses the Microsoft ODBC for Oracle Driver

The connection and site has worked fine forever and a day.  We have recently decided to convert a field in one of our tables from a LONG to a CLOB.  I am now in the process of trying to debug / fix the ASP code to read the CLOB.  I have seen too much information ... some saying that it can not be done  or here is a solution ... and so I go down the path of it can be done.

Here is the SQL:
SELECT id AS msgID, Upper(to_text) AS msgToText, subj_text AS msgSubjText, status AS msgStatus, create_date AS create_date, modify_date AS modify_date, message_text AS msgMessageText, message_length AS msgMessageLen
FROM messages
WHERE message_type = 'XYZ'  
AND id = 417955  
AND to_date('04/21/2006','MM/DD/RRRR') < nvl(modify_date,create_date)  
ORDER BY Create_date desc

** message_text AS msgMessageText is  the CLOB field **

Getting an the following error:
Provider error '80004005'
Unspecified error
GetMessageInfo.vbs, line 63  ... which is the open

I don't even get to the chance to getChunk to read the CLOB field ...

The rest of the site is fine ... all other pages not accessing this new CLOB field are fine.

Any thoughts?

0
Comment
Question by:JeffStone
  • 3
  • 3
6 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 17024167
You will have to switch to use the native Oracle provider.  The Microsoft provider does not support CLOBs
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17024181
Here is some relevant documentation on the subject:
INFO: Supportability of the Microsoft ODBC Driver/ OLE DB Provider for Oracle w.r.t Oracle 8.x
http://support.microsoft.com/kb/q239719/
INFO: Limitations of Microsoft Oracle ODBC Driver and OLEDB Provider
http://support.microsoft.com/kb/q244661/

Having said that, there are two things that may help:  
1. You may have "Show friendly HTTP error messages" checked in your browser which is preventing you from seeing the main error.
2. In general when using ADO, BLOBs should always be placed last in the Select list.
0
 

Author Comment

by:JeffStone
ID: 17024202
Thanks I will look into it and let you know.
Are there any known differences between the Microsoft and Oracle Providers?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:JeffStone
ID: 17024272
thanks will be getting those pts to you shortly, another question if you please
after the open If there is no error and there is data I do the following:
  msgLen = CLng(objMsgRS(msgMessageLen))
  msgBody = objMsgRS(msgMessageText).GetChunk(msgLen)

but am getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
GetMessageInfo.vbs, line 72  ... which is the GetChunk.

any thoughts
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17027078
The coorect syntax is:
msgBody = objMsgRS.Fields("msgMessageText").GetChunk(msgLen)

However, there is no need to use GetChunk to return the value in the column, especially if you are retrieving all of it and not parts at a time.  You should be able to refer to it directly, as you would any other column as in:
msgBody = objMsgRS.Fields("msgMessageText").Value

0
 

Author Comment

by:JeffStone
ID: 17027312
thanks
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Web Traffic Limitations 4 67
UTC (timezone) without using an API 16 50
I am getting ASP error  xmlParseEntityRef: no name. Anyone can help ? 1 72
INNER JOIN ? 8 50
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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