Solved

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

Posted on 2010-11-23
5
1,031 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 167 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 167 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 166 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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