vb mysql 修改表,使用vb.net,mysql创建表

这篇博客探讨了如何在VB.NET应用程序中根据用户输入的文本框内容动态创建MySQL数据库的新表。通过构建一个包含字段定义的SQL查询字符串,并将文本框的输入替换为表名,然后将该字符串传递给MySQLCommand对象执行,实现了从用户输入创建表的功能。
摘要由CSDN通过智能技术生成

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

you can create one string variable having query of "Create table (field1,field2....)"

In above query must be replace with your input text box.

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

And simply execute this query...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值