VB Code:
Private Sub tbUser_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tbUser.KeyPress Dim con As New OleDb.OleDbConnection Dim cmd As New OleDb.OleDbCommand Dim da As New OleDb.OleDbDataAdapter Dim ds As New DataSet If e.KeyChar = Convert.ToChar(Keys.Enter) Then Try con.ConnectionString = "Provider = Microsoft.JET.OLEDB.4.0 ; data source = (local); " & _ "initial catalog=dbGA ; integrated security =SSPI;" con.Open() cmd = con.CreateCommand cmd.CommandText = "SELECT * FROM tbl_login" da.SelectCommand = cmd DataGrid1.DataSource = ds DataGrid1.DataMember = "tbl_login" da.Fill(ds, "tbl_login") con.Close() Catch ex As Exception MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OKOnly) End Try End If End Sub
Everytime I run this program and presses enter a messagebox will show saying that...
"Error: Microsoft OLE DB Service Components: Multiple-step OLE DB Operation generated errors. Check each OLE DB status value, if available. No work was done"
I hope someone could solve this...
Thanks..
By the way using VB.NET 2003 and ACCESS 2003..




Reply With Quote