.CreateParameter recieving a CLOB

I am recieving a CLOB from an oracle query.
How should my .CreateParameter method's parameters look?

This is what I have , but the app seems to be bombing out

.Parameters.Append .CreateParameter("highlight", adVarChar, adParamInput, 57478)
bertino12Asked:
Who is Participating?
 
kodiakbearConnect With a Mentor Commented:
Closed, 125 points refunded.
kb
Experts Exchange Moderator
0
 
fritz_the_blankCommented:
I believe that an adVarChar needs a length parameter and that a text value needs delimiters:

.Parameters.Append .CreateParameter("highlight", adVarChar, adParamInput, 5, "57478")

FtB
0
 
bertino12Author Commented:
I dont think this way works at all for a CLOB. Im trying to find a way to make it work.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
fritz_the_blankCommented:
Well, I don't know about CLOBS, but if you are using an adVarChar, .CreateParameter will require all of those parameters.

A few things to check:

http://forums.oracle.com/forums/thread.jspa?messageID=1116750
http://forums.oracle.com/forums/thread.jspa?messageID=1101332


FtB
0
 
bertino12Author Commented:
I saw those urls early this morning. Unfortunately, they dont help :(
0
 
soconneCommented:
This guy bertino12 is kind of a hot head.
0
 
bertino12Author Commented:
?
0
 
soconneCommented:
Hey man, chill out.  No need to start sending me hateful private messages.  Please respect the rest of us in this forum.
0
 
soconneCommented:
sorry mr han fwitz, I so wery sorwy.  no happen again evwer
0
 
bertino12Author Commented:
Still Havent figured it out im calling a stored procedure last and thats whats blowing up my code. The first 3 createParameters have been tested and work.
The 4th CreateParameter is recieving a CLOB and thats what is messing me up.

    sql = "SELECT doc_id, display_name, " &_
           "to_char((SELECT MAX(process_end_time) FROM CONVERT_LOG l WHERE l.doc_id=d.doc_id), 'MM/DD/YYYY HH:Mi:SS PM')  publish_date" &_
        "Markup_First_Hit(d.doc_id, 'dog', '<b><font style=""background:#FFFF99"">', '</B></font>') highlight " &_
        "FROM DOCUMENTS d WHERE published=1"

      Set oCmd = Server.CreateObject("ADODB.COMMAND")
            With oCmd
            .ActiveConnection = conn
            .CommandType = adCmdText
            .CommandText = sql
            .Parameters.Append .CreateParameter("doc_id", adInteger)
            .Parameters.Append .CreateParameter("display_name", adVarChar)
            .Parameters.Append .CreateParameter("publish_date", adVarChar)
            .Parameters.Append .CreateParameter("highlight")
      end with
      
      Set rst = oCmd.Execute
      Set oCmd = Nothing
0
 
bertino12Author Commented:
I figured it out. I didnt even need a createParameter.
0
 
fritz_the_blankCommented:
I am okay with the refund as long as bertino posts his final solution so that others might reference it.

FtB
0
 
bertino12Author Commented:
I didnt change anything, but took off the createParameter. The select statement contained a stored procedure, but wasnt a stand alone stored procedure so there was no need for createParameter functions.
0
 
Anthony PerkinsCommented:
Just post your solution, as your explanation makes no sense.
0
 
bertino12Author Commented:
How does removing the createParameter not make sense?

   sql = "SELECT doc_id, display_name, " &_
          "to_char((SELECT MAX(process_end_time) FROM CONVERT_LOG l WHERE l.doc_id=d.doc_id), 'MM/DD/YYYY HH:Mi:SS PM')  publish_date" &_
       "Markup_First_Hit(d.doc_id, 'dog', '<b><font style=""background:#FFFF99"">', '</B></font>') highlight " &_
       "FROM DOCUMENTS d WHERE published=1"

     Set oCmd = Server.CreateObject("ADODB.COMMAND")
          With oCmd
          .ActiveConnection = conn
          .CommandType = adCmdText
          .CommandText = sql
     end with
     
     Set rst = oCmd.Execute
     Set oCmd = Nothing
0
 
Anthony PerkinsCommented:
>>How does removing the createParameter not make sense?<<
I was not referring to that, but rather this:
"The select statement contained a stored procedure, but wasnt a stand alone stored procedure so there was no need for createParameter functions."

A select statement cannot contain a stored procedure,, perhaps you meant the reverse: the stored procedure contained a select statement.

I have no idea what you meant by "stand alone stored procedure", perhaps you mean/meant one that does not have parameters.

But the bottom line is that your code does not contain any stored procedures.  Period.  Further you do not even need a Command object for such a trivial exercise.

Glad you got it figured out.
0
All Courses

From novice to tech pro — start learning today.