Click here to Skip to main content
15,909,437 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i use mySQL in asp.net? i want to use the sqldatasource but when i try to configure the datasource mySQL database is not in the selection box... thanks in advanced
Posted

1 solution

install the Library mysql.net it is free to download then configure the connectionstring in web.config and give that connection in the ConnectionString property in SqlDataSource
 
Share this answer
 
Comments
careLess - Eric 6-Oct-13 23:50pm    
thanks for the answer zafar, but i already configured the connection string in my web.config: "connectionstrings:
add name="xxxxxxx" connectionstring="Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=xxxxxxx; User=root;Password=;Option=3;" add
" but when i configure the sqldatasource and set the connection string like this : ConnectionString="<%$ ConnectionStrings:xxxxxxx%>" and when i run my website i get this error driver is not supported, i'm using .net 3.5 framework..
Zafar A khan 7-Oct-13 0:08am    
have you installed MySql Connector http://dev.mysql.com/downloads/connector/net/
careLess - Eric 7-Oct-13 22:58pm    
yah.. i already installed Connector NET 6.7.4 and i add this as reference to my project but still not working...

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