calling stored procedure with optional parameter
- From: "wk6pack" <wkwan@xxxxxxxxxx>
- Date: Mon, 25 Jul 2005 12:40:57 -0700
Hi,
Is it possible to call a stored procedure from vb.net when some of the
parameters are not required in the stored procedure?
Say i have a stored procedure with 3 parameters. I want to call the stored
procedure with only two of the parameters.
I seem to get an error saying I need the 3rd parameter. When I fill in the
3 parameter the sql statement call from vb.net works fine.
code:
cmd.CommandText = "InsertVSIS"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter("@studentkey", adInteger,
adParamInput,,lstudentkey)
thanks,
Will
.
- Follow-Ups:
- Re: calling stored procedure with optional parameter
- From: William \(Bill\) Vaughn
- Re: calling stored procedure with optional parameter
- Prev by Date: Re: IDispatch error #3149
- Next by Date: Re: calling stored procedure with optional parameter
- Previous by thread: ADO Broken Connection
- Next by thread: Re: calling stored procedure with optional parameter
- Index(es):
Relevant Pages
|
|