Thu Nov 06, 2008 3:09 pm
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnUpdate.Click
Dim strConn As String
Dim Conn As New SqlConnection
Dim strSQL As String
Dim ExeQry As SqlCommand
Try
strConn = ConfigurationSettings.AppSettings("connectionString")
Conn = New SqlConnection(strConn)
'Test with simple statement
strSQL = " update StudentMovement "
strSQL = strSQL & " set Last_Update_By = 'In process' "
strSQL = strSQL & " where ECStudId = '" & Session("ECStudId") & "'"
strSQL = strSQL & " and Movementid = '" & vMovementId & " "
ExeQry = New SqlCommand(strSQL, Conn)
Conn.Open()
ExeQry.ExecuteNonQuery()
Conn.Close()
LoadMovementRecords()
Catch exc1 As Exception
Response.Write(exc1.Message)
Finally
If Not (Conn Is Nothing) Then
If Conn.State = System.Data.ConnectionState.Open Then Conn.Close()
End If
End Try
End Sub
Thu Nov 06, 2008 3:10 pm
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.