Subject: Datalist with Child Button
Posted By: MCuthill Post Date: 8/31/2006 12:25:24 PM
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:

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


Any help would be greatly appreciated, Thanks.

Mike
"It Seems All My Problems Exist Between Keyboard And Chair."
Reply By: MCuthill Reply Date: 8/31/2006 12:33:45 PM
Obviously didn't check my post over enough times.

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.

Thanks Again Everyone.



Mike
"It Seems All My Problems Exist Between Keyboard And Chair."

Go to topic 49085

Return to index page 188
Return to index page 187
Return to index page 186
Return to index page 185
Return to index page 184
Return to index page 183
Return to index page 182
Return to index page 181
Return to index page 180
Return to index page 179