Hey Community,
Im running into an issue while trying to create a C# script that connects to a MySql Database.
I used VSCode nuget manager to add MySql.Data from oracle.
I can build the .dll without any errors in my setup.
So i added the .dlls that i build and the mysql stuff in a fivem resource.
I can run the script and a Hello World message with Debug.WriteLine is working.
So i guess the setup is correctly. Now the issue:
When opening the connection, i get this Error:
Unhandled task exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Diagnostics.TraceInternal.get_AppName () [0x0000e] in <e804fc8285a9419784599893ed028695>:0
at System.Diagnostics.TraceInternal.TraceEvent (System.Diagnostics.TraceEventType eventType, System.Int32 id, System.String format, System.Object[] args) [0x0003d] in <e804fc8285a9419784599893ed028695>:0
at System.Diagnostics.Trace.TraceError (System.String message) [0x00000] in <e804fc8285a9419784599893ed028695>:0
at MySql.Data.MySqlClient.MySqlTrace.LogError (System.Int32 id, System.String msg) [0x00026] in <89b4d3936e0b4e49b8d299ddbfe7933d>:0 [ script:LLL_CORE_CS] at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver () [0x0002e] in <89b4d3936e0b4e49b8d299ddbfe7933d>:0
at MySql.Data.MySqlClient.MySqlPool.GetConnection () [0x0001c] in <89b4d3936e0b4e49b8d299ddbfe7933d>:0
at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00245] in <89b4d3936e0b4e49b8d299ddbfe7933d>:0
at TestDB.Class1.DBTESTAsync () [0x0002f] in C:\Users\Maurice\source\repos\TestDB\TestDB\Class1.cs:22
Maybe it has to do with the last line, it gives me the directory of my Windows where i build the solution.
I thank you guys in advance, im really stuck at this point, tried many things like compiling on the linux server itself.