Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 17, 2012 01:28 AM by Decker Dong - MSFT
Member
121 Points
106 Posts
Apr 13, 2012 01:48 PM|LINK
I am trying to do an update from a Gridview. When I click on Update, the updates are not taking affect. Is there anyway you can display error messages from the Gridview to help trouble shoot this?
Bob
256 Points
76 Posts
Apr 13, 2012 01:59 PM|LINK
Check your update query . sometimes you may miss your primary key.
For error message try to write code in DataError event
All-Star
118619 Points
18779 Posts
Apr 15, 2012 02:46 AM|LINK
Hello Night:)
If 2nd's answer cannot resolve your issue,plz show us your full sample codes……(including aspx and cs codes……)
Apr 16, 2012 06:06 PM|LINK
USE [OnlineVisitation]
GO
/****** Object: StoredProcedure [dbo].[OfflineBoothsUpdate]
Script Date: 04/16/2012 14:04:07
******/ SET ANSI_NULLS ON
GO SET QUOTED_IDENTIFIER ON
GO ALTER PROCEDURE [dbo].[OfflineBoothsUpdate]
( @OffBNum int, @OffBDescription varchar(50), @OffBegDate datetime, @OffEndDate datetime, @Original_OffId int, @OffId int )
AS
SET NOCOUNT OFF;
UPDATE [tblOfflineBooths] SET [OffBNum] = @OffBNum, [OffBDescription] = @OffBDescription, [OffBegDate] = @OffBegDate, [OffEndDate] = @OffEndDate WHERE (([OffId] = @Original_OffId));
SELECT OffId, OffBNum, OffBDescription, OffBegDate, OffEndDate FROM tblOfflineBooths WHERE (OffId = @OffId)
Apr 17, 2012 01:28 AM|LINK
Where's your aspx and cs codes?How do you call the stored procdure?
Nighthawk071...
Member
121 Points
106 Posts
Displaying Errors when doing an Update from a Gridview
Apr 13, 2012 01:48 PM|LINK
I am trying to do an update from a Gridview. When I click on Update, the updates are not taking affect. Is there anyway you can display error messages from the Gridview to help trouble shoot this?
Bob
ishq
Member
256 Points
76 Posts
Re: Displaying Errors when doing an Update from a Gridview
Apr 13, 2012 01:59 PM|LINK
Check your update query . sometimes you may miss your primary key.
For error message try to write code in DataError event
Lathika Morthodi
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Displaying Errors when doing an Update from a Gridview
Apr 15, 2012 02:46 AM|LINK
Hello Night:)
If 2nd's answer cannot resolve your issue,plz show us your full sample codes……(including aspx and cs codes……)
Nighthawk071...
Member
121 Points
106 Posts
Re: Displaying Errors when doing an Update from a Gridview
Apr 16, 2012 06:06 PM|LINK
USE [OnlineVisitation]
GO
/****** Object: StoredProcedure [dbo].[OfflineBoothsUpdate]
Script Date: 04/16/2012 14:04:07
******/ SET ANSI_NULLS ON
GO SET QUOTED_IDENTIFIER ON
GO ALTER PROCEDURE [dbo].[OfflineBoothsUpdate]
( @OffBNum int, @OffBDescription varchar(50), @OffBegDate datetime, @OffEndDate datetime, @Original_OffId int, @OffId int )
AS
SET NOCOUNT OFF;
UPDATE [tblOfflineBooths] SET [OffBNum] = @OffBNum, [OffBDescription] = @OffBDescription, [OffBegDate] = @OffBegDate, [OffEndDate] = @OffEndDate WHERE (([OffId] = @Original_OffId));
SELECT OffId, OffBNum, OffBDescription, OffBegDate, OffEndDate FROM tblOfflineBooths WHERE (OffId = @OffId)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Displaying Errors when doing an Update from a Gridview
Apr 17, 2012 01:28 AM|LINK
Where's your aspx and cs codes?How do you call the stored procdure?