troubleshooting Question

ASP command text problem

Avatar of bertino12
bertino12 asked on
2 Comments1 Solution1103 ViewsLast Modified:
I have this code:

sql = "select * from dms_documents dd, dms_law_docs dld where dd.doc_id = " & doc_id & " and dd.doc_id = dld.doc_id and published = 1"

Set oCmd = Server.CreateObject("ADODB.Command")
With oCmd
      .ActiveConnection = conn
                .CommandType = adCmdText
      .CommandText = sql
      .Parameters.Append .CreateParameter("chamber_id", adChar)
      .Parameters.Append .CreateParameter("sortcode", adVarChar)
      .Parameters.Append .CreateParameter("folder_id", adVarChar)
end with
Set rst = oCmd.Execute
Set oCmd = Nothing

Im getting this error:
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/lss/lss.asp, line 117

Line 117 is this:      .CommandType = adCmdText

I have tried all the other parameters and they didnt work.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros