TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anthony Timmers
NA
11
1.4k
Cannot seem to update a GridView (with Datasource).
May 25 2014 6:12 AM
I think I have made mistakes in the UpdateCommand so I'll post it here:
[code]<asp:SqlDataSource ID="LessenDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:LessenConnection %>" SelectCommand="SELECT * FROM [Lessen]" UpdateCommand="UPDATE Lessen SET Titel = @Titel, Aanvang = @Aanvang, Einde = @Einde, GroepId = @GroepId, ZaalId = @ZaalId, DocentId = @DocentId WHERE (Id = @Id)"></asp:SqlDataSource>[/code]
Titel = nvarchar, Aanvang = DateTime, Einde = DateTime, GroepId = int, ZaalId = int, DocentId = int
When I try to edit a field I get the following error:
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
The statement has been terminated.
https://www.dropbox.com/s/wrw6a2d7cro8s9q/GridView.bmp (Image of how the GridView looks)
Reply
Answers (
11
)
Defiiculty in publishing aspx application from VS2010
Automatic HTML formatted emails.