View Full Version : MySQL .Data .dll error.
sun
9th January 2009, 15:08
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.
Ramon F.
9th January 2009, 16:11
Hi, I think you must add the .dll to your project references.
Close Visual Studio.
Download the .NET MySQL connector from here (http://dev.mysql.com/downloads/connector/net/5.2.html) (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:
sun
9th January 2009, 16:29
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.
sun
9th January 2009, 18:22
I guess this is what i need to add in the reference.
NOTE: See the image below.
Heiko1
9th January 2009, 18:31
Try using this:
using System.Data.Common;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Data.ProviderBase;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;
sun
9th January 2009, 18:47
nope. doesn't do an effect.
Heiko1
9th January 2009, 18:50
mh then i dno :shrug:
broken
9th January 2009, 21:10
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
sun
10th January 2009, 17:58
Ok, thank you Broken. I'll try it out. :x
sun
10th January 2009, 18:48
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 -
DarkTimes
10th January 2009, 20:05
edit: irrelevant.
sun
10th January 2009, 20:48
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 :schwitz:
JamesF1
10th January 2009, 21:24
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.
can you explain in smaller text?
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 :thumbsup:
DarkTimes
10th January 2009, 21:26
edit: irrelevant.
dawesdust_12
10th January 2009, 22:12
Sorry... couldn't resist :thumbsup:
:heart:
Made me laugh.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.