Me.Cursor = Cursors.WaitCursor
'資料庫指令!
Dim Str As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=123.mdb"
Dim conn As OleDbConnection = New OleDbConnection(Str)
'刪除表1
conn.Open()
Dim SQL As String = "Delete * from OrderNo "
Dim cmd As OleDbCommand = New OleDbCommand(SQL, conn)
'誇號裡的第一個是SQL的字串,第二個是資料庫的聯結=OleDbConnection cmd.ExecuteNonQuery() '執行SQL
conn.Close()
'刪除表2
conn.Open()
*************略過
conn.Close()
Me.Cursor = Cursors.Default
沒有留言:
張貼留言