|
-
Jul 31st, 2007, 04:49 AM
#1
Thread Starter
Member
Select Button at the datagrid
i having a datagrid which having a button Named select... it is select the row data and store into another table. Below is my code but it cant run.. Can anyone help me?
Code:
Private Sub details_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles details.ItemCommand
Dim sqlstr3 As String
Connect()
sqlstr3 = "Insert Into AssetMovement (Ass_Code, Ass_Category,Ass_Status,CheckInDate,CheckOutDate,ExpiryDate)" & _
"VALUES ('" & e.Item.Cells(1).Text() & "','" & e.Item.Cells(3).Text() & "','" & e.Item.Cells(8).Text() & "','" & DateTime.Now & "',' ','','" & "'30days')"
If (e.CommandName = "Select") Then
RunQuery(sqlstr3)
hidMsg.Value = "S"
Dps()
End If
Response.Redirect("frmAssetMovementList.aspx")
End Sub
-
Jul 31st, 2007, 11:01 AM
#2
Addicted Member
Re: Select Button at the datagrid
Are you getting some kind of error when you try to run the code? If so, could you put the error out here...that might help a little bit more.
Jim P.
"The Force will be with you, always."
--Ben Kenobi--
-
Aug 1st, 2007, 10:46 AM
#3
Re: Select Button at the datagrid
Step through your code, when the debugger reaches sqlstr3, get its value and try running it in Query Analyzer.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|