[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

ADO and Oracle CLOBs

Posted on 2006-07-01
6
Medium Priority
?
1,379 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
[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
  • 3
  • 3
6 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

656 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