Академический Документы
Профессиональный Документы
Культура Документы
OleDb
Imports System.IO
'# Setting how the grid behaves or looks like when filled/loaded
'# you may add more properties here if necessary e.g alternating row
background colors
With grid
.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
.RowHeadersVisible = False
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
End With
'# Setting and opening a connection to the database via connection string
con.ConnectionString = strConn
con.Open()
End Sub
Try
'The connection
con.ConnectionString = strConn
con.Open()
cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message, vbCritical)
Finally
con.Dispose()
con.Close()
End Try
End Sub
Try
'The connection
con.ConnectionString = strConn
con.Open()
cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message, vbCritical)
Finally
con.Dispose()
con.Close()
End Try
End Sub
Private Sub DataGridView1_CellMouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles
DataGridView1.CellMouseClick
save_tag = "edit"
End Sub
save_tag = "new"
End Sub
End Sub
save_tag = "new"
Fill_Grid(DataGridView1)
End Sub
id = TextBox6.Text
delete(id)
Button1.PerformClick()
Fill_Grid(DataGridView1)
End Sub
End Class