27-08-18, 09:15 PM
مشكور اخي elgokr
تم تكرار الكود بهذة الطريقة ويعمل
كود :
If MsgBox("سوف يتم تفريغ قاعدة البيانات بشكل نهائي", vbYesNo + vbQuestion, "رسالة تأكيد") = MsgBoxResult.No Then
If MsgBoxResult.Yes Then
Return
End If
End If
Me.Cursor = Cursors.WaitCursor
Dim str As String = ("Delete from [woork1]")
myconn.cmd = New SqlCommand(str, myconn.conn)
If myconn.conn.State = ConnectionState.Open Then
myconn.conn.Close()
End If
myconn.conn.Open()
myconn.cmd.ExecuteNonQuery()
myconn.conn.Close()
Me.Cursor = Cursors.Default
Me.Cursor = Cursors.WaitCursor
Dim strr As String = ("Delete from [Month_Information]")
myconn.cmd = New SqlCommand(strr, myconn.conn)
If myconn.conn.State = ConnectionState.Open Then
myconn.conn.Close()
End If
myconn.conn.Open()
myconn.cmd.ExecuteNonQuery()
myconn.conn.Close()
Me.Cursor = Cursors.Default
MessageBox.Show("تم تفريغ قاعدة البيانات بشكل نهائي ", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information)هل من تعديل ام ان الامور تماام هيك
بارك الله فيك
