B
Bill Kellaway
Hi there - this should be fairly simple for someone. Basically I
can't figure out how to pass the parameters from ASP to a Stored
Procedure on SQL.
Here's my code:
I just need to help in learning how to pass these varibables from ASP
to the SP.
Here's my ASP code ...
*********************************************************************
DIM Connect, Q, AdminRep, LTSOffice, Gender, OfficeNum
AdminRep = Request("AdminRep")
LTSOffice = Request("LTSOffice")
Gender = Request("Gender")
OfficeNum = Request.Cookies("OfficeNum")
SET Connect = SERVER.CREATEOBJECT("ADODB.CONNECTION")
Connect.Open = "DATABASE=blah;UID=blah;PWD=blah;DSN=blah;"
Connect.Execute("Insert_LeadStat")
Connect.Close
Set Connect = Nothing
*********************************************************************
Gives me this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure
'insert_LeadStat' expects parameter '@OfficeNum', which was not
supplied.
/ltsenroll/leadsource_dbadd.asp, line 22
Here's my Stored procedure ...
*********************************************************************
CREATE PROCEDURE [insert_LeadStat]
( @OfficeNum [int],
@LTSOffice [varchar](50),
@AdminRep [varchar](50),)
AS INSERT INTO [MFKProductions].[dbo].[LeadStats]
( [OfficeNum],
[LTSOffice],
[AdminRep],)
VALUES
( @OfficeNum,
@LTSOffice,
@AdminRep,)
GO
I've searched through the groups and thought I had it with
"parameters.append .createparameter ...." but I can't seem to get this
to work ...
Thanks in advance
can't figure out how to pass the parameters from ASP to a Stored
Procedure on SQL.
Here's my code:
I just need to help in learning how to pass these varibables from ASP
to the SP.
Here's my ASP code ...
*********************************************************************
DIM Connect, Q, AdminRep, LTSOffice, Gender, OfficeNum
AdminRep = Request("AdminRep")
LTSOffice = Request("LTSOffice")
Gender = Request("Gender")
OfficeNum = Request.Cookies("OfficeNum")
SET Connect = SERVER.CREATEOBJECT("ADODB.CONNECTION")
Connect.Open = "DATABASE=blah;UID=blah;PWD=blah;DSN=blah;"
Connect.Execute("Insert_LeadStat")
Connect.Close
Set Connect = Nothing
*********************************************************************
Gives me this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure
'insert_LeadStat' expects parameter '@OfficeNum', which was not
supplied.
/ltsenroll/leadsource_dbadd.asp, line 22
Here's my Stored procedure ...
*********************************************************************
CREATE PROCEDURE [insert_LeadStat]
( @OfficeNum [int],
@LTSOffice [varchar](50),
@AdminRep [varchar](50),)
AS INSERT INTO [MFKProductions].[dbo].[LeadStats]
( [OfficeNum],
[LTSOffice],
[AdminRep],)
VALUES
( @OfficeNum,
@LTSOffice,
@AdminRep,)
GO
I've searched through the groups and thought I had it with
"parameters.append .createparameter ...." but I can't seem to get this
to work ...
Thanks in advance