Hi Everyone,
I am writing the code for an online library and having some trouble setting up the functionality of the the button used to signout a resource. I think that I want to take the primary key of the item in the data list, then assign differnt values to the fields relating to the status of this resource but I am not sure the best way to go about doing this.
Below is what I have thus far:
I know I need to check the value of [dbo_Activity].[IsAvailable] before the user is able to signout an item - my question there is how to take the value returned from the SQL I have and assign it to a variable that I can do a check on.
The other, and more critical question(s) is in regards to the necessary steps to take AFTER the resource has been checked for availablity.
Any help would be greatly appreciated, Thanks.
Mike
"It Seems All My Problems Exist Between Keyboard And Chair.
I am writing the code for an online library and having some trouble setting up the functionality of the the button used to signout a resource. I think that I want to take the primary key of the item in the data list, then assign differnt values to the fields relating to the status of this resource but I am not sure the best way to go about doing this.
Below is what I have thus far:
Code:
Private Sub SearchResults_ItemCommandByVal source As Object, ByVal e As DataListCommandEventArgs) Handles SearchResults.ItemCommand
Dim SQL As String
Dim primaryKey As Integer
primaryKey = CInt(e.CommandArgument)
If e.CommandName = "SignOut" Then
SQL = "SELECT [IsAvailable] FROM [dbo_Activity] WHERE [ResourceID] =" & primaryKey
End If
End Sub
The other, and more critical question(s) is in regards to the necessary steps to take AFTER the resource has been checked for availablity.
Any help would be greatly appreciated, Thanks.
Mike
"It Seems All My Problems Exist Between Keyboard And Chair.