使用vb.net,mysql创建表 [英] Creating Table using vb.net, mysql

查看:75
本文介绍了使用vb.net,mysql创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友想在数据库中创建一个新表(他使用vb.net,mysql).棘手的事情是,他想从被编码为文本框的输入中命名新表.

My friend wants to create a new table in the database (his using vb.net, mysql). The tricky thing is that he wants to name the new table from the input being encoded into a textbox.

有可能吗?通过文本框中的输入创建和命名新表.

Is that possible? To create and name a new table from the input in the textbox.

推荐答案

@njm 您可以创建一个查询为"Create table <name>(field1,field2....)"的字符串变量 在上面的查询中,必须替换为您的输入文本框.

@njm you can create one string variable having query of "Create table <name>(field1,field2....)" In above query must be replace with your input text box.

然后将此字符串传递给具有自己连接的mysql命令变量... 只需执行此查询...

And pass this string to mysql command variable having its own connection ... And simply execute this query...

这篇关于使用vb.net,mysql创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆