Dim conn As New OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data source=database.mdb")
Dim commd As OleDb.OleDbCommand
Dim SQL1 As String = "insert into tbuserlogin(username,password) values ('" & TextBox1.Text & "','" & TextBox2.Text & "' )"
commd = New OleDb.OleDbCommand(SQL1, conn)
conn.Open()
commd.ExecuteNonQuery()
conn.Close()
Try
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= ...\database.mdb"
con.Open()
Catch ex As Exception
MsgBox("There was a problem connection to database.", MsgBoxStyle.Critical)
End Try
Date :
2014-01-24 13:13:56
By :
Honey4U
No. 15
Guest
ช่วยดูให้หน่อยค่ะว่าทำไม่มันถึงรันไม่ได้
Code (VB.NET)
With cm
.CommandType = CommandType.Text
.CommandText = sqlADD
.Connection = Conn
.Transaction = tr
.Execute NonQuery()
End With
Date :
2015-02-23 17:18:28
By :
patteera
No. 16
Guest
ช่วยดูให้หน่อยค่ะว่าทำไม่มันถึงรันไม่ได้
Code (VB.NET)
With cm
.CommandType = CommandType.Text
.CommandText = sqlADD
.Connection = Conn
.Transaction = tr
.Execute NonQuery()
End With