Solved

ADO and Oracle CLOBs

Posted on 2006-07-01
6
1,351 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

947 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

20 Experts available now in Live!

Get 1:1 Help Now