delete

Download Delete

If you can't read please download the document

Upload: gem-david

Post on 04-Oct-2015

214 views

Category:

Documents


0 download

DESCRIPTION

gfdghfjhgdnhg

TRANSCRIPT

DELETEDim ans As Intans = Msgbox2 ("Do you wish to?","Please select","View Info", "Edit","Delete",Null)If ans = DialogResponse.POSITIVE ThenQuery ="SELECT * FROM tblstudinfo WHERE StudNo = ?"Cursor1= Main.SQL1.ExecQuery2(Query, Array As String (Value))If Cursor1.RowCount > 0 ThenCursor1.Position = 0strStudNo = Cursor1.getstring("StudNo")strLName = Cursor1.getstring("LName")strFName = Cursor1.getstring("FName")strMName = Cursor1.getstring("MName")Msgbox("Student ID: " & strStudNo & CRLF & "Last Name: " & strLName & CRLF & "First Name: " & strFName & CRLF & "Middle Name: " & strMName,"Student Info") End IfElse If ans = DialogResponse.NEGATIVE ThenDim ans As Int ans = Msgbox2 ("Do you really want to delete the record?","Delete Record","Yes","","No",Null)If ans = DialogResponse.POSITIVE ThenQuery = "DELETE FROM tblstudinfo WHERE StudNo = ?"Main.SQL1.ExecNonQuery2(Query, Array As String (Value))showListEnd IfElseMain.lstChoice = TrueMain.strStudID1 = ValueStartActivity("Main")Activity.FinishEnd If