|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Gridview Updates not writing to database after clicking updateI have a gridview tied to a single table in a sql server database. I have
created an update query on the datasource UPDATE dbo.PredefinedTasks SET PredefinedTask = @PredefinedTask, TaskFilterID = @TaskFilterID WHERE (PredefinedTaskID = @original_PredefinedTaskID) I have enabled the gridview for editing. When I click edit, i change the PredefinedTask column and click update. The row returns to an edit row but the changes I made are not reflected. I had several gridviews working with Beta 2, but now they are doing the same change. What am I missing? Hi Rickey,
Welcome to ASP.NET newsgroup. From your description, you have a ASP.NET 2.0 page which ues GridView with edit/update function. Now it broke working after move from beta2 environment to RTM, yes? I'm not sure about the underlying datasource, are you using the SqlDataSource control? If so, I suggest you first try reconfigure the SqlDAtaSource control (regenerate and refresh the schema). After that, rebind the SqlDataSource control to the GridView (detach the GridView's DataSource first and attach it with the reconfigured DataSourceControl again). Then, test the page again to see whether it works. Based on my experience, there'll occur some small configuration requirement changes. I suggest you also try comparing the problem GridView's aspx template with some other working page(new created in RTM environment) to see whether there is any difference. Hope helps. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Rickey Whitworth" <rickey@community.nospam> microsoft.public.dotnet.framework.aspnet.webcontrols:11726| Subject: Gridview Updates not writing to database after clicking update | Date: Sun, 6 Nov 2005 19:08:45 -0600 | Lines: 15 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | X-RFC2646: Format=Flowed; Original | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | Message-ID: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: 66.182.150.119 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | I have a gridview tied to a single table in a sql server database. I have | created an update query on the datasource | | UPDATE dbo.PredefinedTasks SET PredefinedTask = @PredefinedTask, | TaskFilterID = @TaskFilterID WHERE (PredefinedTaskID = | @original_PredefinedTaskID) | | I have enabled the gridview for editing. When I click edit, i change the | PredefinedTask column and click update. The row returns to an edit row but | the changes I made are not reflected. | | I had several gridviews working with Beta 2, but now they are doing the same | change. What am I missing? | | | I've done some more searching on the web, my problem appears to be related
to the fact that Microsoft has changed the default setting for OldValuesParameterFormatString to {0} where it used to be original_{0} If I go and change this value to its beta 2 default, my updates work fine. Before I did this I tried changing my update query parameter from @original_PredefinedTaskID to @PredefinedTaskID, but this doesn't work. I'm assuming Microsoft changed the default value for a reason, so there must be a new recommended way to write update queries. Any one have any ideas? Show quoteHide quote "Rickey Whitworth" <rickey@community.nospam> wrote in message news:OMgvfgz4FHA.400@TK2MSFTNGP09.phx.gbl... >I have a gridview tied to a single table in a sql server database. I have >created an update query on the datasource > > UPDATE dbo.PredefinedTasks SET PredefinedTask = @PredefinedTask, > TaskFilterID = @TaskFilterID WHERE (PredefinedTaskID = > @original_PredefinedTaskID) > > I have enabled the gridview for editing. When I click edit, i change the > PredefinedTask column and click update. The row returns to an edit row but > the changes I made are not reflected. > > I had several gridviews working with Beta 2, but now they are doing the > same change. What am I missing? > Hi Rickey,
Can you reproduce the behavior through a standard sample database, like the NorthWind or Pubs? If so, would you try posting a simple test page here so that I can have a test on my side? Also, as I mentioned in the former thread, since there could exists some mini changes on the gridview or datasource control's template syntax, the recommend means is to reconfigure the SqlDatasource and rebind it to the DataBinding control . Please feel free to let me know if you need any assistance. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- Show quoteHide quote | From: "Rickey Whitworth" <rickey@community.nospam> microsoft.public.dotnet.framework.aspnet.webcontrols:11737| References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> | Subject: Re: Gridview Updates not writing to database after clicking update | Date: Mon, 7 Nov 2005 07:59:59 -0600 | Lines: 28 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | X-RFC2646: Format=Flowed; Response | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | Message-ID: <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: 66.182.150.119 | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | I've done some more searching on the web, my problem appears to be related | to the fact that Microsoft has changed the default setting for | OldValuesParameterFormatString to {0} where it used to be original_{0} | | If I go and change this value to its beta 2 default, my updates work fine. | Before I did this I tried changing my update query parameter from | @original_PredefinedTaskID to @PredefinedTaskID, but this doesn't work. I'm | assuming Microsoft changed the default value for a reason, so there must be | a new recommended way to write update queries. Any one have any ideas? | | "Rickey Whitworth" <rickey@community.nospam> wrote in message | news:OMgvfgz4FHA.400@TK2MSFTNGP09.phx.gbl... | >I have a gridview tied to a single table in a sql server database. I have | >created an update query on the datasource | > | > UPDATE dbo.PredefinedTasks SET PredefinedTask = @PredefinedTask, | > TaskFilterID = @TaskFilterID WHERE (PredefinedTaskID = | > @original_PredefinedTaskID) | > | > I have enabled the gridview for editing. When I click edit, i change the | > PredefinedTask column and click update. The row returns to an edit row but | > the changes I made are not reflected. | > | > I had several gridviews working with Beta 2, but now they are doing the | > same change. What am I missing? | > | | | Hi Rickey,
Have you got any progress on this? If there're anything else we can help, please feel free to post here. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | X-Tomcat-ID: 64509598 <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl>| References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> | MIME-Version: 1.0 microsoft.public.dotnet.framework.aspnet.webcontrols:11752| Content-Type: text/plain | Content-Transfer-Encoding: 7bit | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) | Organization: Microsoft | Date: Tue, 08 Nov 2005 03:16:32 GMT | Subject: Re: Gridview Updates not writing to database after clicking update | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | Message-ID: <R0hhaLB5FHA.3***@TK2MSFTNGXA01.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | Lines: 74 | Path: TK2MSFTNGXA01.phx.gbl | Xref: TK2MSFTNGXA01.phx.gbl Show quoteHide quote | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 | | Hi Rickey, | | Can you reproduce the behavior through a standard sample database, like the | NorthWind or Pubs? If so, would you try posting a simple test page here so | that I can have a test on my side? Also, as I mentioned in the former | thread, since there could exists some mini changes on the gridview or | datasource control's template syntax, the recommend means is to | reconfigure the SqlDatasource and rebind it to the DataBinding control . | | Please feel free to let me know if you need any assistance. | | Thanks, | | Steven Cheng | Microsoft Online Support | | Get Secure! www.microsoft.com/security | (This posting is provided "AS IS", with no warranties, and confers no | rights.) | -------------------- | | From: "Rickey Whitworth" <rickey@community.nospam> | | References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> | | Subject: Re: Gridview Updates not writing to database after clicking | update | | Date: Mon, 7 Nov 2005 07:59:59 -0600 | | Lines: 28 | | X-Priority: 3 | | X-MSMail-Priority: Normal | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | | X-RFC2646: Format=Flowed; Response | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | | Message-ID: <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl> | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | | NNTP-Posting-Host: 66.182.150.119 | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl | | Xref: TK2MSFTNGXA01.phx.gbl | microsoft.public.dotnet.framework.aspnet.webcontrols:11737 | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | | | I've done some more searching on the web, my problem appears to be | related | | to the fact that Microsoft has changed the default setting for | | OldValuesParameterFormatString to {0} where it used to be original_{0} | | | | If I go and change this value to its beta 2 default, my updates work | fine. | | Before I did this I tried changing my update query parameter from | | @original_PredefinedTaskID to @PredefinedTaskID, but this doesn't work. | I'm | | assuming Microsoft changed the default value for a reason, so there must | be | | a new recommended way to write update queries. Any one have any ideas? | | | | "Rickey Whitworth" <rickey@community.nospam> wrote in message | | news:OMgvfgz4FHA.400@TK2MSFTNGP09.phx.gbl... | | >I have a gridview tied to a single table in a sql server database. I | have | | >created an update query on the datasource | | > | | > UPDATE dbo.PredefinedTasks SET PredefinedTask = @PredefinedTask, | | > TaskFilterID = @TaskFilterID WHERE (PredefinedTaskID = | | > @original_PredefinedTaskID) | | > | | > I have enabled the gridview for editing. When I click edit, i change | the | | > PredefinedTask column and click update. The row returns to an edit row | but | | > the changes I made are not reflected. | | > | | > I had several gridviews working with Beta 2, but now they are doing the | | > same change. What am I missing? | | > | | | | | | | | I haven't had a chance to dig into it any deeper. For now it works with the
change, so I am happy. Thanks for your help. Show quoteHide quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message news:kwZHP4e5FHA.1236@TK2MSFTNGXA02.phx.gbl... > Hi Rickey, > > Have you got any progress on this? If there're anything else we can help, > please feel free to post here. > > Thanks, > > Steven Cheng > Microsoft Online Support > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > -------------------- > | X-Tomcat-ID: 64509598 > | References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> > <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl> > | MIME-Version: 1.0 > | Content-Type: text/plain > | Content-Transfer-Encoding: 7bit > | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) > | Organization: Microsoft > | Date: Tue, 08 Nov 2005 03:16:32 GMT > | Subject: Re: Gridview Updates not writing to database after clicking > update > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | Message-ID: <R0hhaLB5FHA.3***@TK2MSFTNGXA01.phx.gbl> > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | Lines: 74 > | Path: TK2MSFTNGXA01.phx.gbl > | Xref: TK2MSFTNGXA01.phx.gbl > microsoft.public.dotnet.framework.aspnet.webcontrols:11752 > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 > | > | Hi Rickey, > | > | Can you reproduce the behavior through a standard sample database, like > the > | NorthWind or Pubs? If so, would you try posting a simple test page here > so > | that I can have a test on my side? Also, as I mentioned in the former > | thread, since there could exists some mini changes on the gridview or > | datasource control's template syntax, the recommend means is to > | reconfigure the SqlDatasource and rebind it to the DataBinding control . > | > | Please feel free to let me know if you need any assistance. > | > | Thanks, > | > | Steven Cheng > | Microsoft Online Support > | > | Get Secure! www.microsoft.com/security > | (This posting is provided "AS IS", with no warranties, and confers no > | rights.) > | -------------------- > | | From: "Rickey Whitworth" <rickey@community.nospam> > | | References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> > | | Subject: Re: Gridview Updates not writing to database after clicking > | update > | | Date: Mon, 7 Nov 2005 07:59:59 -0600 > | | Lines: 28 > | | X-Priority: 3 > | | X-MSMail-Priority: Normal > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 > | | X-RFC2646: Format=Flowed; Response > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 > | | Message-ID: <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl> > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols > | | NNTP-Posting-Host: 66.182.150.119 > | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl > | | Xref: TK2MSFTNGXA01.phx.gbl > | microsoft.public.dotnet.framework.aspnet.webcontrols:11737 > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols > | | > | | I've done some more searching on the web, my problem appears to be > | related > | | to the fact that Microsoft has changed the default setting for > | | OldValuesParameterFormatString to {0} where it used to be original_{0} > | | > | | If I go and change this value to its beta 2 default, my updates work > | fine. > | | Before I did this I tried changing my update query parameter from > | | @original_PredefinedTaskID to @PredefinedTaskID, but this doesn't > work. > | I'm > | | assuming Microsoft changed the default value for a reason, so there > must > | be > | | a new recommended way to write update queries. Any one have any ideas? > | | > | | "Rickey Whitworth" <rickey@community.nospam> wrote in message > | | news:OMgvfgz4FHA.400@TK2MSFTNGP09.phx.gbl... > | | >I have a gridview tied to a single table in a sql server database. I > | have > | | >created an update query on the datasource > | | > > | | > UPDATE dbo.PredefinedTasks SET PredefinedTask = @PredefinedTask, > | | > TaskFilterID = @TaskFilterID WHERE (PredefinedTaskID = > | | > @original_PredefinedTaskID) > | | > > | | > I have enabled the gridview for editing. When I click edit, i change > | the > | | > PredefinedTask column and click update. The row returns to an edit > row > | but > | | > the changes I made are not reflected. > | | > > | | > I had several gridviews working with Beta 2, but now they are doing > the > | | > same change. What am I missing? > | | > > | | > | | > | | > | > | > Thanks for your followup.
Glad that it already been working for you. If you need any other assistance, please feel free to post here. Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | From: "Rickey Whitworth" <rickey@community.nospam> <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl> | References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> <R0hhaLB5FHA.3***@TK2MSFTNGXA01.phx.gbl> <kwZHP4e5FHA.1***@TK2MSFTNGXA02.phx.gbl> | Subject: Re: Gridview Updates not writing to database after clicking microsoft.public.dotnet.framework.aspnet.webcontrols:31053update | Date: Thu, 10 Nov 2005 08:52:05 -0600 | Lines: 125 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | X-RFC2646: Format=Flowed; Original | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | Message-ID: <uptEZZg5FHA.1***@TK2MSFTNGP09.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: 66.182.150.119 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl| | I haven't had a chance to dig into it any deeper. For now it works with the | change, so I am happy. Thanks for your help. | | "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message | news:kwZHP4e5FHA.1236@TK2MSFTNGXA02.phx.gbl... | > Hi Rickey, | > | > Have you got any progress on this? If there're anything else we can help, | > please feel free to post here. | > | > Thanks, | > | > Steven Cheng | > Microsoft Online Support | > | > Get Secure! www.microsoft.com/security | > (This posting is provided "AS IS", with no warranties, and confers no | > rights.) | > -------------------- | > | X-Tomcat-ID: 64509598 | > | References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> | > <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl> | > | MIME-Version: 1.0 | > | Content-Type: text/plain | > | Content-Transfer-Encoding: 7bit | > | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) | > | Organization: Microsoft | > | Date: Tue, 08 Nov 2005 03:16:32 GMT | > | Subject: Re: Gridview Updates not writing to database after clicking | > update | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | > | Message-ID: <R0hhaLB5FHA.3***@TK2MSFTNGXA01.phx.gbl> | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | > | Lines: 74 | > | Path: TK2MSFTNGXA01.phx.gbl | > | Xref: TK2MSFTNGXA01.phx.gbl | > microsoft.public.dotnet.framework.aspnet.webcontrols:11752 | > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 | > | | > | Hi Rickey, | > | | > | Can you reproduce the behavior through a standard sample database, like | > the | > | NorthWind or Pubs? If so, would you try posting a simple test page here | > so | > | that I can have a test on my side? Also, as I mentioned in the former | > | thread, since there could exists some mini changes on the gridview or | > | datasource control's template syntax, the recommend means is to | > | reconfigure the SqlDatasource and rebind it to the DataBinding control . | > | | > | Please feel free to let me know if you need any assistance. | > | | > | Thanks, | > | | > | Steven Cheng | > | Microsoft Online Support | > | | > | Get Secure! www.microsoft.com/security | > | (This posting is provided "AS IS", with no warranties, and confers no | > | rights.) | > | -------------------- | > | | From: "Rickey Whitworth" <rickey@community.nospam> | > | | References: <OMgvfgz4FHA.***@TK2MSFTNGP09.phx.gbl> | > | | Subject: Re: Gridview Updates not writing to database after clicking | > | update | > | | Date: Mon, 7 Nov 2005 07:59:59 -0600 | > | | Lines: 28 | > | | X-Priority: 3 | > | | X-MSMail-Priority: Normal | > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 | > | | X-RFC2646: Format=Flowed; Response | > | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 | > | | Message-ID: <eugmeO64FHA.1***@TK2MSFTNGP12.phx.gbl> | > | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | > | | NNTP-Posting-Host: 66.182.150.119 | > | | Path: Show quoteHide quote | > | | Xref: TK2MSFTNGXA01.phx.gbl | > | microsoft.public.dotnet.framework.aspnet.webcontrols:11737 | > | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | > | | | > | | I've done some more searching on the web, my problem appears to be | > | related | > | | to the fact that Microsoft has changed the default setting for | > | | OldValuesParameterFormatString to {0} where it used to be original_{0} | > | | | > | | If I go and change this value to its beta 2 default, my updates work | > | fine. | > | | Before I did this I tried changing my update query parameter from | > | | @original_PredefinedTaskID to @PredefinedTaskID, but this doesn't | > work. | > | I'm | > | | assuming Microsoft changed the default value for a reason, so there | > must | > | be | > | | a new recommended way to write update queries. Any one have any ideas? | > | | | > | | "Rickey Whitworth" <rickey@community.nospam> wrote in message | > | | news:OMgvfgz4FHA.400@TK2MSFTNGP09.phx.gbl... | > | | >I have a gridview tied to a single table in a sql server database. I | > | have | > | | >created an update query on the datasource | > | | > | > | | > UPDATE dbo.PredefinedTasks SET PredefinedTask = @PredefinedTask, | > | | > TaskFilterID = @TaskFilterID WHERE (PredefinedTaskID = | > | | > @original_PredefinedTaskID) | > | | > | > | | > I have enabled the gridview for editing. When I click edit, i change | > | the | > | | > PredefinedTask column and click update. The row returns to an edit | > row | > | but | > | | > the changes I made are not reflected. | > | | > | > | | > I had several gridviews working with Beta 2, but now they are doing | > the | > | | > same change. What am I missing? | > | | > | > | | | > | | | > | | | > | | > | | > | | |
getting Membership userid to use and store in a custom database
detailsview asp.net 2 and insert confirmation General Event Handler For Runtime Buttons Dynamically Adding DataLists Custom DropDownList Control and ListItem GridView DataFormatString not formatting AssociatedControlID?? Custom Control Design Mode 10M free hosting 10M free hosting |
|||||||||||||||||||||||