Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6681193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:33:44+00:00 2026-05-26T04:33:44+00:00

I’m writing a tool the retrieves data from an Oracle database. The majority of

  • 0

I’m writing a tool the retrieves data from an Oracle database. The majority of the fields are VARCHAR2, but there’s one particular field I want to retrieve that is a CLOB. I’m trying to convert the text in this CLOB to a string that I can then run a regex against it to isolate a certain bit of information and then display that information in the program’s console. Unfortunately, I can’t seem to figure out how to convert this CLOB into a usable string.

I’ve tried a lot of different things, but what I’ve got at the moment is:


    With OraDynaset
        If .RecordCount > 0 Then
            .MoveFirst()
            While (Not .EOF Or .BOF)
                m_StrThis = .Fields("This").Value
                clobSupportProcs = .Fields("That").Value
                m_strThat = (clobSupportProcs).ToString
                .MoveNext()
            End While
        End If
    End With

The field “This” works fine, as it’s not a CLOB. The field “That” is the troublemaker. I’ve read in other posts that there’s a way to stream this in chunks into something usable, but I’ve yet to see a clear example of how this is done.

I’d appreciate any CONSTRUCTIVE comments or help. I understand that using a CLOB wasn’t necessary to begin with — this database is over 10 years old however. I have no control over that. I understand that I’m connecting to the database in a less than elegant way. I don’t care about that. I just need these two little bits of information. I’m not a pro, just a guy trying to write a tool that will make his life easier. Any help is much appreciated. Unhelpful comments are not.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:33:45+00:00Added an answer on May 26, 2026 at 4:33 am

    I was finally able to figure this out by playing with the possible properties and methods.

    The solution is:

    Dim clobSupportProcs As OracleInProcServer._IOraClob
    Dim clobSize As Integer
    Dim clobOut As String
    
    With OraDynaset
            If .RecordCount > 0 Then
                .MoveFirst()
                While (Not .EOF Or .BOF)
                    m_StrThis = .Fields("THIS").Value
                    clobSupportProcs = .Fields("THAT").Value
                    clobSize = clobSupportProcs.size
    
                    If clobSize > 0 Then
                        clobSupportProcs.Read(clobOut)
                        m_strThat= clobOut
                    Else
                        m_strThat= "None"
                    End If
    
                    .MoveNext()
                End While
            End If
        End With
    

    So basically, you read the clob to a string (clobOut).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to construct a data frame in an Rcpp function, but when I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.