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
cool kid
NA
11
3.8k
unable to update multiple colums
Aug 2 2012 2:13 PM
hi there,
Im doing a reservation seats. In my database i have a columns t1,t2,t3 and etc where i want to assign it to 'booked'. But i keep getting error near "=". I tried and it seems the error is from the array part
Dim s As String = lblSelected.Text.ToString()
Dim forbook() As String
forbook = Split(s, ",")
For i As Integer = 0 To UBound(forbook)
mycn2.Open()
sql2 = "UPDATE bookingDetails SET '" & forbook(i).ToString() & "'='booked' WHERE bookingDate=@bookingDate AND startTime=@startTime AND endTime=@endTime AND storeId=@storeId"
cmd2.Parameters.AddWithValue("@bookingDate",DateTime.Parse(bookingDAte.ToString(formatDate)))
cmd2.Parameters.AddWithValue("@startTime", startTime)
cmd2.Parameters.AddWithValue("@endTime", endTime)
cmd2.Parameters.AddWithValue("@storeId", storeId)
cmd2.ExecuteNonQuery()
Next
mycn.close()
Any help would be much appreciated. Thanks in advance.
Reply
Answers (
9
)
About Grid
clickable column with comma seperated values in listview control in asp.net 3.5