How to connect to MySQL Database?

后端 未结 6 1179
孤街浪徒
孤街浪徒 2020-11-22 11:36

I\'m very new to C# programming but would like to be able to access MySQL Databases (do not have the money for MS SQL)

However I have one question; I know you are re

6条回答
  •  鱼传尺愫
    2020-11-22 11:51

    Looking at the code below, I tried it and found: Instead of writing DBCon = DBConnection.Instance(); you should put DBConnection DBCon - new DBConnection(); (That worked for me)

    and instead of MySqlComman cmd = new MySqlComman(query, DBCon.GetConnection()); you should put MySqlCommand cmd = new MySqlCommand(query, DBCon.GetConnection()); (it's missing the d)

提交回复
热议问题