for the first time i am havin this kind of issue, i tried some google'in but of none help.
Code:Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Log("Application Started Successfully") Log("Attempting To Connect To Database", True) If dbConnect(Application.StartupPath & "\myDatabase.mdb") Then Log("Successfully Connected To Database", True) Else MessageBox.Show("Unable To Connect To Database Critical Error", APP_NAME, MessageBoxButtons.OK, MessageBoxIcon.Error) Application.Exit() End If 'Using cmd As New OleDb.OleDbCommand("INSERT INTO MY_SETTING VALUES(1, 'TEST', 'TEST')", Conn) ' Debug.Print("Record's Affected : " & cmd.ExecuteNonQuery()) 'End Using Using cmd As New OleDbCommand("SELECT * from MY_SETTING;", Conn) Debug.Print("Total ID : " & cmd.ExecuteNonQuery()) End Using End Sub
The weird problem is INSERT is working but Select is not working!





Reply With Quote