?
Solved

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

Posted on 2010-11-23
5
Medium Priority
?
1,039 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Accepted Solution

by:
samic400 earned 668 total points
ID: 34204689
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
ID: 34205818
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 668 total points
ID: 34206263
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 664 total points
ID: 34220991
Hi,

check out this link.

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

it might helps
0
 

Author Closing Comment

by:silentthread2k
ID: 34233484
:-)
0

Featured Post

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

764 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