Solved

VB Script on Win XP    .Parameters.Append .CreateParameter("@FirstName", adVarChar, adParamInput, 255)     bombs

Posted on 2006-06-13
8
1,560 Views
Last Modified: 2008-01-09
I think something might have changed in the way VBS is interpreted by WSH or ???

The line in the question title
.Parameters.Append .CreateParameter("@FirstName", adVarChar, adParamInput, 255)
bombs with the error "arguments of the wrong type, out of range or are in conflict with each other"

Any ideas???  Thanks,
0
Comment
Question by:FatalErr
  • 4
  • 3
8 Comments
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 16898670
What makes you believe this to be the case?

Have you upgraded your operating system, or version of Windows Scripting Host?

Or has the database structure changed & your parameter data type now does not match the database column?

BFN,

fp.
0
 
LVL 1

Author Comment

by:FatalErr
ID: 16898835
It used to run before I started working here (supposedly).  It doesn't work now and no modifications I make to it prevent the error from occuring.  That's why I suspect the WSH change.  It matches my database column.  I made a table with 1 column and edited the stored proc to have only one parameter.
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 16898845
Which version of WSH are you now using, and which version where you using prior to your current location?
0
 
LVL 1

Author Comment

by:FatalErr
ID: 16898859
How can I tell what version of WSH I'm using?   I have no info about the history.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Accepted Solution

by:
CWS (haripriya) earned 500 total points
ID: 16900666
Replace your code with this:

.Parameters.Append .CreateParameter("FirstName", adVarChar, adParamInput, 255,variable1)
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 16901396
What's "variable1"?
0
 
LVL 1

Author Comment

by:FatalErr
ID: 16904912
WSH (or whatever is handling this) won't evaluate the enums.  I used .Parameters.Append .CreateParameter("FirstName", 200, 3, 255) and it worked.  I went with the syntax suggestion because it was a syntax problem.  Thanks both of you for your help.  

0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 16907758
Odd it worked before, and now it doesn't, in any respect.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now