datagridview查询输入值
2021-01-09 13:33
标签:table cli data man lda 连接字符串 GridView and new using system.data.sql datagridview查询输入值 标签:table cli data man lda 连接字符串 GridView and new 原文地址:https://www.cnblogs.com/clark-club/p/13084282.html
using system.data.sqlclient
dataset ds= new dataset();
string connectionString=连接字符串
string commandString=查询语句(如"select * from 表 where 内容=‘"+ textbox.text +"‘")
SqlConnection con= new SqlConnection(connectionString)
con.open()
SqlDataAdapter da= new SqlDataAdapter(commandString)
da.fill(ds)
datagrid.datesource=ds.table[0].defaultview
上一篇:windows关闭端口方法
下一篇:Python爬虫学习:简单的爬虫