Click here to Skip to main content
15,914,642 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to fix this error when try to connect MySql database using c#.
The given error is ,

The type 'System.Data.Common.DbConnection' is
defined in an assembly that is not referenced. You must add a reference to assembly
'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Thanks.
Posted

1 solution

Do you have the "System.Data" assembly added as a reference to your project? That's what it appears to be complaining about.
 
Share this answer
 
Comments
Ran 2 11-Jul-12 1:31am    
Yes Vani I've already used "System.data" in my project.
Sergey Alexandrovich Kryukov 11-Jul-12 1:47am    
What do you mean "already used"? Referenced or not? Referenced, not "used". Huh?
--SA
pradiprenushe 11-Jul-12 1:41am    
Have u modified Web.Config assemblies section?
Sergey Alexandrovich Kryukov 11-Jul-12 1:48am    
What does 'u' mean?
--SA
Sergey Alexandrovich Kryukov 11-Jul-12 1:49am    
Most likely that is as simple. Probably OP does not know what is a "reference". My 5 for the answer.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900