开发者

In Visual Basic, how can I see/edit tables in a remote mysql database

I'm trying to build 开发者_如何学Goan application so that the user can see table entries in a mysql database. I'm programming this in visual basic. How can this be done?


Include MySql connector to project, set a reference to MySql.Data.MySqlClient and create a MySqlConnection to remote host.

Example (C#):

string cstr = 
    String.Format("SERVER={0};PORT={1};UID={2};PWD={3}",
    host, port, user, password);
MySqlConnection conn = new MySqlConnection(cstr);

VB.Net:

dim cstr as string = 
    String.Format("SERVER={0};PORT={1};UID={2};PWD={3}",
        host, port, user, password)
dim conn as MySqlConnection = new MySqlConnection(cstr)

VB example should work...

Then you can use TableAdapters, Datasets and DataGrids to achieve your goal...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜