Ask a Question related to ASP Database, Design and Development.
-
ross #1
Optional Parameters ASP to SQL stored procedure
Hi there,
Can someone help, this is driving me crazy
I have written a stored procedure in sql with input, output and return
parameters. This works fine. All but one of input parameters are
optional.
If i add a record using query analyser it works fine, adding nulls (my
default values in all other fields)
My problem is that when I come to asp, it ignores the fact that i have
optional parameters, only working when I provide all, text snippet
shown
ASP CODE SNIPPET
with objCmd
.ActiveConnection = objConn
.CommandText = "sp_add_app"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("Return", adInteger,
adParamReturnValue,4,0)
'Add Input Parameters: add in order that appear in stored
procedure
.Parameters.Append .CreateParameter("app_type", adChar,
adParamInput,1,"N")
....
....
.Execute , , adExecuteNoRecords
status = .Parameters("Status")
appid = .Parameters("application")
return_code = .Parameters("Return")
End With
indeed the first field in .CreateParameter seems to be ignored all
together and it works whatever i put in...i assumed these had to match
to what was in sql stored procedure.
Any help would be greatly appreciated.
ross Guest
-
WSDL and Optional Parameters
Since there's no way to create a c# method with optional, or nullable parameters. And since you can't write an overloaded web method. Is it... -
Retrieve output parameters from failed stored procedure
Is it possible to retrieve output parameters (adParamOutput) from a stored procedure (asp/sql server) even when the procedurte fails - or is it... -
Stored Procedure Parameters (text)
I have a stored procedure that takes parameter @description with datatype set to text. In my ASP I have the following: ..Parameters.Append... -
Need more help on how to pass parameters from stored procedure into trigger
Thanks oj for responding to my query. But since I am a novice I was able to decipher the statements but was not able to determine where should all... -
How to Pass stored procedure parameters inside trigger
I have an Update trigger defined on PITRY table. This trigger in turn inserts old records from PITRY table into PITRYAudit and inserts the related...



Reply With Quote

