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 yser 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.