如何使用组合框传递表名 [英] how to pass table name using combobox

查看:49
本文介绍了如何使用组合框传递表名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好......

在我的项目中,想要使用组合框传递访问数据库的表名

In my project wanted to pass the table names of access database using the combobox 

  Query =" insert into Table01(test)values('" + textBox1.Text +"')" ;; 

 Query = "insert into Table01 (test) values ('" + textBox1.Text + "')"; 

上面的示例查询是针对已修复的访问数据库table(Table01)我想通过使用组合框传递表名。

in above example query is for a access database fixed table (Table01) i wanted to pass table name by using the combobox.

Query =" insert into combobox.text(test)values('" + textBox1.Text +" ")英寸; 像这样,我被尝试了。

Query = "insert into combobox.text (test) values ('" + textBox1.Text + "')";  like this i was tried.

关于 

Praveena。(:

Praveena.(:

推荐答案

Query = string.Format("insert into {0} values ('{1}');", combobox.SelectedItem, textBox1.Text);





这篇关于如何使用组合框传递表名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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