473,463 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SP Command Error

I a running a SP and calling it through ASP. I keep getting this
error:

Parameter object is improperly defined. Inconsistent or incomplete
information was provided.
I think I have the format of the date wrong somewhere. Can someone
help?

Here is the command:

<%

Dim spDup__rma
spDup__rma = ""
if(Request.Form("hdnrma") <"") then spDup__rma =
Request.Form("hdnrma")

Dim spDup__model
spDup__model = ""
if(Request.Form("hdnmodel") <"") then spDup__model =
Request.Form("hdnmodel")

Dim spDup__part
spDup__part = ""
if(Request.Form("part") <"") then spDup__part = Request.Form("part")

Dim spDup__qty
spDup__qty = ""
if(Request.Form("hdnqty") <"") then spDup__qty = Request.Form("qty")

Dim spDup__date
spDup__date = ""
if(Request.Form("btdate") <"") then spDup__date =
Request.Form("btdate")

%>
<%

set spDup = Server.CreateObject("ADODB.Command")
spDup.ActiveConnection = MM_connReclaim_STRING
spDup.CommandText = "dbo.dup"
spDup.Parameters.Append spDup.CreateParameter("@RETURN_VALUE", 3, 4)
spDup.Parameters.Append spDup.CreateParameter("@rma", 200,
1,15,spDup__rma)
spDup.Parameters.Append spDup.CreateParameter("@model", 200,
1,15,spDup__model)
spDup.Parameters.Append spDup.CreateParameter("@part", 200,
1,5,spDup__part)
spDup.Parameters.Append spDup.CreateParameter("@qty", 200,
1,15,spDup__qty)
spDup.Parameters.Append spDup.CreateParameter("@date", 135,
1,30,spDup__date)
spDup.Parameters.Append spDup.CreateParameter("@result", 200, 2)
spDup.CommandType = 4
spDup.CommandTimeout = 0
spDup.Prepared = true
spDup.Execute()
spDupResult = spDup("@result")

%>
The format of the date going to the SP is ......
FormatDateTime(Now,2) .......
The format of the date in the SP is ................ smalldatetime
...........................

Everything inserts to the DB fine with the above 2 formats together but
it seems to be thowing the SP command off.

Jan 22 '07 #1
2 1751
Mangler wrote:
I a running a SP and calling it through ASP. I keep getting this
error:

Parameter object is improperly defined. Inconsistent or incomplete
information was provided.
I think I have the format of the date wrong somewhere. Can someone
help?
See this:
http://classicasp.aspfaq.com/date-ti...ith-dates.html
Using parameters, you should not be attempting to apply a format. You
should be supplying a date as a date, not as a string which is what is
returned by formatdatetime). Do this:
spDup__date =CDate(spDup__date )
Also, see this for an easier technique for passing parameter values:
http://groups.google.com/group/micro...09dc1701?hl=en
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jan 22 '07 #2
spDup.Parameters.Append spDup.CreateParameter("@result", 200, 2)

Forget I said anything, had a brain fart and forgot to put the size of
the output. Changed the above to:

spDup.Parameters.Append spDup.CreateParameter("@result", 200, 2,3)

and all is well....

Jan 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Laura P | last post by:
Hi, I wasn't sure whether this should be posted in the Java are or in a Solaris thread, so I shall post it in both. Sorry for the duplication. I am new to Solaris and am having trouble...
4
by: MLH | last post by:
I am having failures processing the following command and I wonder if you can tell me what I must do in order to have success. When I try to run source mysql_dump.sql.txt ==> it is a problem...
12
by: Rhino | last post by:
I am having an odd problem: the sqlj command on my system doesn't work. I am running DB2 (LUW) V8 (FP8) on WinXP. I haven't done an sqlj program since Version 6 of DB2 (LUW) so I checked the...
2
by: Chris Bolus | last post by:
I'm a teacher using MS Access on an RMConnect 2.4 network. On some workstations both I and my students sometimes get an error message when attempting to insert a command button on a form which...
2
by: SunRise | last post by:
Hi I am creating a C Program , to extract only-Printable-characters from a file ( any type of file) and display them. OS: Windows-XP Ple help me to fix the Errors & Warnings and explain...
0
by: Andre Azevedo | last post by:
Hi all ! I've created a .net serviced component with only one method. This method receive an ADODB.Command object and execute it. The ADODB.Command object is created in the client process. (VB...
5
by: Genboy | last post by:
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1, is no longer compiling for me via the command line. As I have done 600 times in the last year and a half, I can compile to...
34
by: Roman Mashak | last post by:
Hello, All! I'm implementing simple CLI (flat model, no tree-style menu etc.). Command line looks like this: <command> <param1> <param2> ... <paramN> (where N=1..4) And idea is pretty simple: ...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
2
by: Taras_96 | last post by:
Hi everyone, I'm trying to run a number of commands stored within a sql file from within php using mysqli::query. The syntax I'm using is: source C:\data\projects\forum...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.