کد با Data Adapter:
Dim str As String = "Insert Into Info Values (Nam='" & txtName.Text & "',Famil='" & txtLastName.Text & "',Adress='" & txtAdress.Text & "',Mail='" & txtMail.Text & "',Phone='" & txtPhone.Text & "',Mobile='" & txtMob.Text & "')"
da = New OleDbDataAdapter
da.InsertCommand = New OleDbCommand(str, conn)
conn.Open()
da.InsertCommand.ExecuteNonQuery()
conn.Close()
کد با Command :
Dim cmd As New OleDbCommand("Insert Into Info Values (Nam='" & txtName.Text & "',Famil='" & txtLastName.Text & "',Adress='" & txtAdress.Text & "',Mail='" & txtMail.Text & "',Phone='" & txtPhone.Text & "',Mobile='" & txtMob.Text & "')", conn)
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()