VB.Net (open database)
Hi Everyone,
Can someone please tell me what is wrong with this code?
When I run it, it stops at the ExecutiveNonQuery
<Public Sub ProjectFeed_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim connect As New OleDb.OleDbConnection
Dim sqlString As String
Dim projCommand As OleDb.OleDbCommand
connect.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = D:\Pharmout Documents\Project.mdb"
connect.Open()
sqlString = "Insert into Projects " & "(Project No,Client,Rate Type,Description,Starting date,Location,Status,Comment,Manager)" & _
"values(txtProjectNo.text,txtclient.text,cmbRate.t ext,txtDescription.text,txtStart.text, txtlocation.text, ,txtStatus.text,txtComment.text,txtManager.text)"
projCommand = New OleDb.OleDbCommand(sqlString, connect)
projCommand.ExecuteNonQuery()
Me.Hide()
connect.Close()
End Sub/>
Thanks
Khalil
|