I have a problem with connecting to the database.
private static readonly string s_connectionString = "Server=db.inu.hu; Database=patientRegistry;UID=****; Password=****; Port=3306; Trusted_Connection=true";
That's my connection string and with this I can't open the connection.
using (SQLiteConnection conn = new SQLiteConnection(s_connectionString))
{
conn.Open();
}
I thought the problem might be that I have a table in the database and need to add that to the connection string.
答案 0 :(得分:1)
Are you trying to connect to MySQL or SQLite? You are referencing a SQLiteConnection
object, but I think you need to be using a MySqlConnection
connection object instead.