LMSouq
general-dev Open

Configuration System Failed to Initialize

SE
sean
1 month ago
3 views
Problem Description
I'm currently creating a Login form and have this code: string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; try { using (OdbcConnection connect = new OdbcConnection(connectionString)) { connect.Open(); OdbcCommand cmd = new OdbcCommand("SELECT username, password FROM receptionist", connect); OdbcDataReader reader = cmd.ExecuteReader(); if (username_login.Text == username && password_login.Text == password) { this.Hide(); MessageBox.Show("Invalid User", "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); } else MessageBox.Show("Invalid User", "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error); connect.Close(); } } catch (OdbcException ex) { MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error); } But whenever I try to type in the username and password there is an error called "_Configuration system failed to initialize_". What kind of problem is this, and how could I solve this?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base