Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Data Parameters through ASP

Status
Not open for further replies.

paulnew2000

Programmer
Dec 8, 2000
5
US
I have successfully passed userid and password for my SQL Server logon through a script, but I'm not able to get this to work.

I called Seagate but they were very little help, though very courteous.

This is my current attempt:
===
Set session("ParamCollection") = session("oRpt").ParameterFields
Set oParam = session("ParamCollection").Item(1)
Call oParam.ClearCurrentValueAndRange
Call oParam.AddCurrentValue(CDate(#1999/10/01 #))
Set oParam = session("ParamCollection").Item(2)
Call oParam.AddCurrentValue(CDate(#1999/12/01 #))
===
 
PaulNew2000: Why not use 1 paramater defined as a range. You could then use ClearCurrentValueAndRange and AddCurrentRange passing both responses comma separated. David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
set StoredProcParamCollection = Session("oRpt").ParameterFields

' - get the specific Store Procedure Parameter
' Create a variable and point it to the specific stored procedure
' that we want to work on

Set StoredProcParam1 = StoredProcParamCollection.item(1)
Set StoredProcParam2 = StoredProcParamCollection.item(2)
Set StoredProcParam3 = StoredProcParamCollection.item(3)
Set StoredProcParam4 = StoredProcParamCollection.item(4)

' - save the new value to the Stored Proc Param
' Create a variable and store the new value for the Stored Procedure
' in it

ParamValue1 = "27" 'CustomerID
ParamValue2 = "10" 'ProductID
ParamValue3 = "11/01/1999" 'Start Date
ParamValue4 = "12/15/1999" 'Stop Date

' Save the new value for the Stored Procedure in the Store Procedure
' Always use a string param... it seems to work the best. for some reason
' it does not matter what the param is actually defined as in the SQL procedure
' so use it this way until you run into a problem....
StoredProcParam1.SetCurrentValue cstr(ParamValue1), 12 '12 means a string param
StoredProcParam2.SetCurrentValue cstr(ParamValue2), 12 '12 means a string param
StoredProcParam3.SetCurrentValue cstr(ParamValue3), 12 '12 means a string param
StoredProcParam4.SetCurrentValue cstr(ParamValue4), 12 '12 means a string param
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top