|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
@ Parameter QuestionI'm trying to understand where a SQLDataSource control gets the value for the
@ parameter that it passes to its sql action queries. I have a page where the insert and update work just fine and find a "@CompanyID" value to use on the sql statements but when I try to do a delete, I get an error page with the message: Exception Details: System.Data.SqlClient.SqlException: Must declare the variable '@CompanyID'. Can anyone tell me where this value comes from and/or what I should be looking for to fix my problem? Thanks very much! TJHerman wrote:
> I'm trying to understand where a SQLDataSource control gets the value It should be under <DeleteParameters>> for the @ parameter that it passes to its sql action queries. > > I have a page where the insert and update work just fine and find a > "@CompanyID" value to use on the sql statements but when I try to do a > delete, I get an error page with the message: > > Exception Details: System.Data.SqlClient.SqlException: Must declare > the variable '@CompanyID'. > > Can anyone tell me where this value comes from and/or what I should be > looking for to fix my problem? -- Riki Thanks very much for your response. It actually turned out to be that somehow
I didn't have a Datakeyname value defined on my formview. Show quoteHide quote "Riki" wrote: > TJHerman wrote: > > I'm trying to understand where a SQLDataSource control gets the value > > for the @ parameter that it passes to its sql action queries. > > > > I have a page where the insert and update work just fine and find a > > "@CompanyID" value to use on the sql statements but when I try to do a > > delete, I get an error page with the message: > > > > Exception Details: System.Data.SqlClient.SqlException: Must declare > > the variable '@CompanyID'. > > > > Can anyone tell me where this value comes from and/or what I should be > > looking for to fix my problem? > > It should be under <DeleteParameters> > > -- > > Riki > > >
Setting Properties in a Composite Control...
Repeater and text boxes inside how to change labelvalue when deleting row in gridview? Programmatically listening for an event? Can't install iewebcontrols.msi - error "webctrl_client is unavailable" Multi-line textbox scrolled to bottom? Problem handling event in a button inside a Datalist How to put an image in a GridView textfield not recognized in gridview menu control with XML file |
|||||||||||||||||||||||