easer way to set a parameter (sqldataadapter)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is there an easer way to set a parameter on an updatecommand
SqlDataAdapter5.InsertCommand.Parameters(SqlDataAdapter5.InsertCommand.Parameters.IndexOf("@evtName")).Value() = txtEvtName.Text
thanks
kes
 
You mean besides:
SqlDataAdapter5.InsertCommand.Parameters("@evtName").Value =
txtEvtName.Text
or
if there is an enum,
SqlDataAdapter5.InsertCommand.Parameters(enuSa5.EventName).Value =
txtEvtName.Text

I'll be discussing these nuances in my course next week (June 18) at
DevTeach in Montreal.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
no, that's what i ment. The "inteli" cents kept asking for an integer and i
believed it.
thanks this is much appreciated
kes
 
Back
Top