开发者

mysql server integration with Visual Studio 2010 .net

'm Using Visual st开发者_开发知识库udio 2010 express edition installed in OS win7(64bit). and I downloaded mysql server 5.5.16 (64bit) which installed successfully. Now all i want to integrate these mysql server with VS 2010. I tried by installing mysql Connector for .Net(32bit) but nothing useful.nd their is no connector of 64bit for .Net. VS database explorer does not show mysql option to connect to mysql server while connecting to database. I'm very new to these technologies. Please help me out.'M trying from past 6 days.


there is an ODBC connector for 64 bit:

Connector/ODBC 5.1.8

for Visual Studio Server Explorer integration, if you manage to configure the ODBC connection string and get it listed all the better but not sure what kind of DB servers VS server explorer supports, even if it won't show up it does not mean it would not work, that is only a UI tool.

You should have another UI Tool for mySQL, I used SLQYog in the past and was very satisfied.

once you have a mySQL database created and having some tables and few records in it you can try to make a connection from .NET and check how it works, you can do something like this in your .NET code (just one of many using Connection examples...):

static private void InsertRow(string connectionString)
{
    string queryString = "INSERT INTO myTable...";

    OdbcCommand command = new OdbcCommand(queryString);

    using (OdbcConnection connection = new OdbcConnection(connectionString))
    {
        command.Connection = connection;
        connection.Open();
        command.ExecuteNonQuery();

        // The connection is automatically closed at 
        // the end of the Using block.
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜