Advertisement

05.25.2008 at 06:56PM PDT, ID: 23431858 | Points: 125
[x]
Attachment Details

Multiple-step OLE DB operation generated errors.

Asked by probelaw in Active Server Pages (ASP), MS SQL Server, SQL Server 2005

I am trying to update database records using a stored procedure on SQL Server passing values from an ASP Script.  I keep getting errors, most of the time...

Multiple-step OLE DB operation generated errors.

I have a feeling it has something to do with my numeric fields, since I have not really worked with these much to date.

The sp and asp code are pasted below.  Any help would be appreciated.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
ALTER PROCEDURE [dbo].[sp_CHEM_Containers_Update]
	-- Add the parameters for the stored procedure here
 
@ContainerID int,
@ChemicalName varchar(200),
@ChemicalFormula varchar(200),
@ContainerAmt numeric(18,2),
@ContainerAmtUnit varchar(50),
@ContainerType int,
@Amount numeric(18,2),
@AmountUnit varchar(10),
@EquivAmount numeric(18,2),
@EquivAmountUnit varchar(10),
@PurchaseDate datetime,
@Location int,
@StorageCode varchar(5),
@ModBy varchar(50),
@ModDate datetime,
@Verified bit,
@MSDSComplete bit,
@HSFSComplete bit,
@DeleteContainer bit
 
AS
 
Update CHEM_Containers
 
SET
 
ChemicalName=@ChemicalName,
ChemicalFormula=@ChemicalFormula,
ContainerAmt=@ContainerAmt,
ContainerAmtUnit=@ContainerAmtUnit,
ContainerType=@ContainerType,
Amount=@Amount,
AmountUnit=@AmountUnit,
EquivAmount=@EquivAmount,
EquivAmountUnit=@EquivAmountUnit,
PurchaseDate=@PurchaseDate,
Location=@Location,
StorageCode=@StorageCode,
ModBy=@ModBy,
ModDate=getdate(),
Verified=@Verified,
MSDSComplete=@MSDSComplete,
HSFSComplete=@HSFSComplete,
DeleteContainer=@DeleteContainer
 
WHERE
 
ContainerID = @ContainerID
 
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
END
 
 
-------------------------
 
set cmd_Update_Container = Server.CreateObject("ADODB.Command")
cmd_Update_Container.ActiveConnection = MM_sql_probelaw_com_jplace_STRING
cmd_Update_Container.CommandText = "dbo.sp_CHEM_Containers_Update"
cmd_Update_Container.CommandType = 4
cmd_Update_Container.CommandTimeout = 0
cmd_Update_Container.Prepared = true
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@RETURN_VALUE", 3, 4,8)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ContainerID", 3, 1,8,cmd_Update_Container__ContainerID)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ChemicalName", 200, 1,200,cmd_Update_Container__ChemicalName)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ChemicalFormula", 200, 1,200,cmd_Update_Container__ChemicalFormula)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ContainerAmt", 131, 1,18,cmd_Update_Container__ContainerAmt)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ContainerAmtUnit", 200, 1,10,cmd_Update_Container__ContainerAmtUnit)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ContainerType", 3, 1,8,cmd_Update_Container__ContainerType)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@Amount", 131, 1,18,cmd_Update_Container__Amount)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@AmountUnit", 200, 1,10,cmd_Update_Container__AmountUnit)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@EquivAmount", 131, 1,18,cmd_Update_Container__EquivAmount)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@EquivAmountUnit", 200, 1,10,cmd_Update_Container__EquivAmountUnit)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@PurchaseDate", 135, 1,50,cmd_Update_Container__PurchaseDate)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@Location", 3, 1,8,cmd_Update_Container__Location)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@StorageCode", 200, 1,5,cmd_Update_Container__StorageCode)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ModBy", 200, 1,50,cmd_Update_Container__ModBy)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@ModDate", 135, 1,50,cmd_Update_Container__ModDate)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@Verified", 3, 1,1,cmd_Update_Container__Verified)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@MSDSComplete", 3, 1,1,cmd_Update_Container__MSDSComplete)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@HSFSComplete", 3, 1,1,cmd_Update_Container__HSFSComplete)
cmd_Update_Container.Parameters.Append cmd_Update_Container.CreateParameter("@DeleteContainer", 3, 1,1,cmd_Update_Container__DeleteContainer)
 
 
cmd_Update_Container.Execute()
[+][-]05.26.2008 at 01:39AM PDT, ID: 21645310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.26.2008 at 05:22AM PDT, ID: 21645989

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628