Note that there are some explanatory texts on larger screens.

plurals
  1. POThe ConnectionString property has not been initialized help databases
    text
    copied!<p>I have been trying to work this out for the last 4 weeks and cannot find the answer I've just been going around in circles. I have had multiple errors with con As New OleDb.OleDbConnection and connection string and ISAM's </p> <pre><code>Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim con As New OleDb.OleDbConnection Dim dbProvider As String Dim dbSource As String Dim da As OleDb.OleDbDataAdapter Public sql As String Dim ds As New DataSet Dim dbPassword As String dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;" dbSource = "C:\Users\Edward\Desktop\Edward\DataBase Login Window\Users.mdb;Jet OLEDB:Database" con.ConnectionString = dbProvider &amp; dbSource con.Open() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click sql = "SELECT * FROM users WHERE accUsername='" &amp; TextBox1.Text &amp; "'AND accPass='" &amp; TextBox2.Text &amp; "'" da = New OleDb.OleDbDataAdapter(sql, con) da.Fill(ds, "users") If ds.Tables("users").Rows.Count = 1 Then Dim isAdmin As Boolean = ds.Tables("users").Rows(0).Item(4) If isAdmin = True Then MsgBox("Logged in.") Form4.Show() Form4.Username = TextBox1.Text Form4.Password = TextBox2.Text ElseIf isAdmin = False Then MsgBox("Logged in user.") Form6.Show() Form6.Username = TextBox1.Text Form6.Password = TextBox2.Text End If Else MsgBox("Incorrect Username or Password") End If Me.Hide() ds.Clear() Me.Refresh() End Sub Private Sub createanaccount_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles createanaccount.Click Form2.ShowDialog() End Sub End Class </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload