ballhogjoni Posted May 7, 2007 Share Posted May 7, 2007 My question is, Can Asp.net code work with mySQL? Quote Link to comment https://forums.phpfreaks.com/topic/50364-solved-can-aspnet-code-work-with-mysql/ Share on other sites More sharing options...
jokerofacoder Posted May 7, 2007 Share Posted May 7, 2007 Yes, I'm using it for my applications. You need to install their MySql driver for .NET (MySql Connector 2.0). http://dev.mysql.com/downloads/connector/net/5.0.html Then add the MySql.Data.dll library after installing the connect into your project. Just use it like you would with SqlCommand only replace the SqlCommand with MySqlCommand. Here is sample code: using MySql.Data; public class Test() { public Test() { MySqlConnection conn = new MySqlConnection(blahblah); MySqlCommand comm = new MySqlCommand(conn); comm.ExecuteScalar(); } } Quote Link to comment https://forums.phpfreaks.com/topic/50364-solved-can-aspnet-code-work-with-mysql/#findComment-247352 Share on other sites More sharing options...
ballhogjoni Posted May 7, 2007 Author Share Posted May 7, 2007 thank you Quote Link to comment https://forums.phpfreaks.com/topic/50364-solved-can-aspnet-code-work-with-mysql/#findComment-247429 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.