Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI
i m making website in asp.net and want to pass mysql.data.dll with my project..
i copied it in bin folder..and i dont have any entry in web.config..

i uploaded site in a server

and when i use
C#
using MySql.Data.MySqlClient;  in my default.aspx

i get error as
C#
Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 1:  using System;
Line 2:  
Line 3:  using MySql.Data.MySqlClient;
Line 4:  
Line 5:  

pls can u help me out

I also added as reference and then what to do before putting it to server

also to upload solution to server

should i publish website or build website or what ??

My question is : i make a asp.net website and want to upload on windows server
Posted
v3
Comments
walterhevedeich 27-Sep-13 2:48am    
You did not mention anything about adding it as a reference on your web application project. Copying on the folder is not enough. You need to add it as reference as well.
Thomas ktg 27-Sep-13 3:15am    
Yes i agree with Walterhevedeich.
maulikshah1990 27-Sep-13 3:17am    
I also added as reference and then what to do before putting it to server

also to upload solution to server

should i publish website or build website or what ??

My question is : i make a asp.net website and want to upload on windows server
Harshil_Raval 27-Sep-13 3:19am    
Hi, how you get this mysql.data.dll? I think you have followed this steps.
http://dev.mysql.com/doc/refman/5.6/en/connector-net-installation-windows.html
If yes, then check on your server.. have these steps followed or not?
maulikshah1990 27-Sep-13 3:22am    
hii dont have access to server ..only details as

MySQL 5.1.68
MySQL Connector/NET 3.51.25

which version from above should be mysql.data.dll version to download

1 solution

you need to go to

project- add refrences
than you need to select System.Data.SQLClient

Hope this will resolve your problem.
 
Share this answer
 

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