Hey guys,
Anyone care to give me a quick tutorial on how to connect and insert data to a MySQL db?
I'm familiar with SQL, just not in C#.
I've tried some of the code found on the forum, but i keep getting the following error:
Code:error CS0234: The type or namespace name `MySql' does not exist in the namespace `Oxide.Ext'. Are you missing an assembly reference?
Connecting to MySQL database? (C#)
Discussion in 'Rust Development' started by Spoof 2, Dec 5, 2015.
-
Wulf Community Admin
-
Exactly the one i was looking at, but as you can see from my error, it's missing that reference.
I'm got using Oxide.Core;
And i call this lines:
Code:private readonly Ext.MySql.Libraries.MySql _mySql = Interface.GetMod().GetLibrary<Ext.MySql.Libraries.MySql>(); private Ext.MySql.Connection _mySqlConnection;
-
Wulf Community Admin
Do you have the using statement for it at the top? I'd also recommend setting up Visual Studio 2015, it'd essentially fix it for you.
-
The using statement is on top (right after using system) and i do use VS15...
[DOUBLEPOST=1449279590][/DOUBLEPOST]Oh, and looks like i posted in the wrong forum, could you move it over to dev ?
[DOUBLEPOST=1449339533,1449278196][/DOUBLEPOST]Can anyone confirm that the MySQL addon works, and maybe have a quick look at my previous posts and see what i might be doing wrong? Thanks -
Wulf Community Admin
-
Okey, I've copied the entire example from MySQL Extension and it works. So its something in my code. I'll mark this as solved, and follow opp with the solution when i figure it out.
[DOUBLEPOST=1449360374][/DOUBLEPOST]Oh for fuck sake.
Turns out the comment on the first line is necessary. I thought the compiler skipped all comment lines...
Code:// Reference: Oxide.Ext.MySql
-
Wulf Community Admin
-
-
Wulf Community Admin