The online racing simulator
#1 - sun
MySQL .Data .dll error.
hi,

I'm having a problem with this. I got it to work when i understood
what you was on about 'MySQL.dll'. Because i'm at high school we dont
get treated like baby's what makes me more mature than the other post's
in this topic.

Ok, let me tell you.

Basically the insim elmohelno released i downloaded and i am converting my insim
to an SQL insim. So i'm NOT copyting the whole form1.cs ( the whole insim basically ).
and when i fixed MOST of the errors i still get the MySQL error.

the MySQL.Data.dll is already included into the project has you can see below on the
image. I have NOT experienced this error before with the SQL file included.

does anyone know whats wrong?

I'll keep trying to fix it! and i'll post back with my silution. but for now please help.

Kind, Regards,

Owen.
Attached images
MySQL Included.JPG
Hi, I think you must add the .dll to your project references.
  • Close Visual Studio.
  • Download the .NET MySQL connector from here (Windows Binaries).
  • Install it.
  • Open VS and your solution/project.
  • In the Solution Explorer right click References and click Add Reference.
  • In .NET tab select MySQL.Data.
  • Solution Explorer, expand References, select MySQL.Data and change the property Copy To Local to TRUE.
  • Then you need to add "using MySql.Data.MySqlClient;" in the class file where you are using MySQL objets.
Good luck :insane:
#3 - sun
Ahh. Thank you! it worked. Now i get loads of errors about the SQL thing.

do you want me to show you the erros? there quite diffucult or maybe to anyone else easy in your case for you to fix.
#4 - sun
I guess this is what i need to add in the reference.

NOTE: See the image below.
Attached images
MySQL.JPG
Try using this:


[COLOR=Blue]using[/COLOR] System.Data.Common;
[COLOR=Blue]using[/COLOR] System.Data.Odbc;
[COLOR=Blue]using[/COLOR] System.Data.OleDb;
[COLOR=Blue]using[/COLOR] System.Data.ProviderBase;
[COLOR=Blue]using [/COLOR]System.Data.Sql;
[COLOR=Blue]using[/COLOR] System.Data.SqlClient;
[COLOR=Blue]using[/COLOR] [COLOR=Black]System.Data.SqlTypes[/COLOR];

#6 - sun
nope. doesn't do an effect.
mh then i dno
try this:
Place the MySql.Data.dll in your Release folder.
Whenever you decide to give the InSim give the MySql.Data.dll with it.

Then:

Top menu -> Project -> Add reference -> Browse -> Find Release folder\MySql.Data.dll

after you have done this:

using MySql.Data;

Edit: I see it has been explained some place upper.. Sorry..
About the errors... I see you have SQL.cs and you are doing SQLInfo.NewUser ..Try with just SQL.NewUser
#9 - sun
Ok, thank you Broken. I'll try it out.
#10 - sun
Ok. I have put yhis in. Everything that aid FileInfo. bla bla is now set to

SQLInfo. bla bla...

And now my compiler is saying that the clsPlayer is incorrect but the other ones are? somthings bugy here.

Here there is a picture what i'm talking about at the bottom -
Attached images
MyDQl & clsPlayer.JPG
edit: irrelevant.
#12 - sun
Quote from DarkTimes :also make sure you have a using directive to the namespace which contains the clsPlayer class at the top of the file.

I dont understand that piece of text you said then? can you explain in smaller text?

sorry
Quote from DarkTimes :The compiler can't find the definition for clsPlayer any more, make sure it's still in its file and it doesn't have any spelling mistakes, also make sure you have a using directive to the namespace which contains the clsPlayer class at the top of the file.

Quote from sun :can you explain in smaller text?

Quote from DarkTimes :The compiler can't find the definition for clsPlayer any more, make sure it's still in its file and it doesn't have any spelling mistakes, also make sure you have a using directive to the namespace which contains the clsPlayer class at the top of the file.

Sorry... couldn't resist
edit: irrelevant.

FGED GREDG RDFGDR GSFDG