Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > @ Parameter Question

Reply
Thread Tools

@ Parameter Question

 
 
TJHerman
Guest
Posts: n/a
 
      07-12-2006
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?

Thanks very much!
 
Reply With Quote
 
 
 
 
Riki
Guest
Posts: n/a
 
      07-13-2006
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


 
Reply With Quote
 
 
 
 
TJHerman
Guest
Posts: n/a
 
      07-13-2006
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.

"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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameter to function not expecting parameter Mister B C Programming 8 08-26-2010 08:01 AM
decltype as a template parameter when containing reference to anothertemplate parameter. Isti C++ 2 04-19-2010 10:01 PM
without declare parameter [double square(parameter)] return 0 in main WanHongbin@gmail.com C Programming 5 10-01-2008 03:31 AM
Using declaration inside first template parameter as default valuefor second template parameter. Stuart Redmann C++ 5 12-14-2007 08:42 AM
Parameter List / Parameter Block / Anything patterns... mast2as@yahoo.com C++ 4 03-29-2007 09:37 PM



Advertisments