Solved

Syntax error or access voilation. 80040E14 Error running vbscript that runs stored procedure

Posted on 2010-11-23
5
1,016 Views
Last Modified: 2012-05-10
Hi,

I'm having a problem running a vbscript that runs a stored procedure with an output parameter.
Here is a snippet of what I have...

          Set objParamIn = objCommand.CreateParameter("@inID",3,1,,InVariable)          
            objCommand.Parameters.Append objParamIn
            Set objParamOut = objCommand.CreateParameter("@outResult",3,2,,)
            objCommand.Parameters.Append objParamOut
            Set rsYourRecordSet = objCommand.Execute

I get a Microsoft VBScript compilation error
on this line...

Set objParamOut = objCommand.CreateParameter("@outResult",3,2,,)

If I give it a bogus value like...

Set objParamOut = objCommand.CreateParameter("@outResultCode",3,2,,emptyvalue)

It compiles and reaches the execute, but fails and gives this error...

Syntax error or access voilation. 80040E14
Microsoft OLE DB Provider for SQL Server

Not sure what I'm doing wrong here.
0
Comment
Question by:silentthread2k
5 Comments
 
LVL 13

Accepted Solution

by:
samic400 earned 167 total points
Comment Utility
This line:
Set objParamOut = objCommand.CreateParameter("@outResult",3,2,,emptyvalue)

You have defined as a 4-byte signed integer. What type of value is it from the table in your stored procedure?

What is the value of emptyvalue - are you sure it is a value of an integer and not a string or NULL?

0
 

Author Comment

by:silentthread2k
Comment Utility
Hi, the SP definition has both input and output parameters as "integer"

In the VBScript, I just declare emptyvalue like this...
Dim emptyvalue
and it's not used until the SP is called.
0
 
LVL 4

Assisted Solution

by:trythisone
trythisone earned 167 total points
Comment Utility
This is probably due to using an invalid value.  See the following link for more information:

http://tutorials.aspfaq.com/8000xxxxx-errors/why-do-i-get-80040e14-errors.html
0
 
LVL 19

Assisted Solution

by:Bhavesh Shah
Bhavesh Shah earned 166 total points
Comment Utility
Hi,

check out this link.

http://www.andreavb.com/forum/viewtopic_4924.html

it might helps
0
 

Author Closing Comment

by:silentthread2k
Comment Utility
:-)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

771 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

9 Experts available now in Live!

Get 1:1 Help Now