VBScript (in qtp), IE:6, Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another

I am running vbscript in qtp.  When it comes to creating the recordset it throws an error.  I have taken the querry and executed it in winsql, successfully returning results.  I have also trimmed down the sql statement to simply be select a.* from db2sza4.MID_CPOB_TRNS_STG a (I still recieve the same error).
' ADO State Types
Const adStateClosed = 0
Const adStateOpen = 1
 
' ADO Cursor Locations
Const adUseServer = 2
Const adUseClient = 3
 
' ADO Cursor Types
Const adOpenForwardOnly = 0 
Const adOpenKeyset = 1
Const adOpenDynamic = 2 
Const adOpenStatic = 3 
 
' ADO Lock Types
Const adLockReadOnldeleteRow = 1
Const adLockPessimistic = 2 
Const adLockOptimistic = 3 
Const adLockBatchOptimistic = 4 
 
Const ADS_SCOPE_SUBTREE = 2
 
Dim conDB2
Dim strUserId                  ' User ID
Dim strPswd                    ' Password
 
Set objExcel = CreateObject("Excel.Application")
Set conDB2 = CreateObject("ADODB.Connection")
Set rsRawCompare= CreateObject("ADODB.Recordset")
 
' Set object Default settings.
conDB2.CursorLocation = adUseClient
 
strUserID = **
strPswd = ***
 
conDB2.Open "Provider=IBMDADB2;DSN=" & strDSN & ";DBNAME=" & strDB & ";User ID=" & strUserID & ";Password=" & strPswd & ";"
'THIS IS WHERE THE ERROR OCCURRS
rsRawCompare.Open "Select a.BU_RAW_TRNS_ID A, b.BU_RAW_TRNS_ID B, a.ADMN_TRNS_ID C, b.ADMN_TRNS_ID D, a.EVNT_TYP_LBL_CD E, b.EVNT_TYP_LBL_CD F, a.INV_ID G, b.INV_ID H, a.BAS_CTGRY_LBL_CD I, b.BAS_CTGRY_LBL_CD J, a.BAS_TYP_LBL_CD K, b.BAS_TYP_LBL_CD L, a.BAS_AMT M, b.BAS_AMT N, a.ADMN_TRNS_EFCTV_DT O, b.ADMN_TRNS_EFCTV_DT P, a.ADMN_PRCS_DT Q, b.ADMN_PRCS_DT R, a.CMP_POB_PRCS_DT S, b.ADMN_TRNS_PRCS_DT T, a.BLD_TS U, a.CHG_BY_ID V, a.TRNS_SRCE_LBL_CD W, b.TRNS_SRCE_LBL_CD X, a.SUB_ORG_LBL_CD Y, b.SUB_ORG_LBL_CD Z,a.ADMN_POB_ID AA, b.ADMN_POB_ID AB, a.CMP_POB_ID AC, c.CMP_POB_ID AD from db2sza4.MID_CPOB_TRNS_STG a, db2sza4.MID_ADMN_TRNS_STG b, db2sza4.MID_CMP_POB c where ((a.BU_RAW_TRNS_ID = b.BU_RAW_TRNS_ID) and    (a.ADMN_TRNS_ID = b.ADMN_TRNS_ID) and    (a.CMP_POB_ID = c.CMP_POB_ID)) order by a.BU_RAW_TRNS_ID", conDB2, adOpenStatic, adLockReadOnly
 
objExcel.Visible = True
objExcel.Workbooks.Add

Open in new window

FuzzbumperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BobTheViolentCommented:
If the error occurs where you said it does I would think it is a problem with the connection string not the actual SQL since you got query results manually in winsql anyway.

Go check out http://www.connectionstrings.com/ and see if it helps verify you have it formatted correctly.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FuzzbumperAuthor Commented:
You know, BobTheViolent.  Sometimes it just takes an extra set of eyes.  After messing with that sql statement forever, one of my properties was set incorrectly.  Thanks for the help.  
0
BobTheViolentCommented:
Glad that worked for you.  Very true about the second set of eyes comment.  Happens to me often!  :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.