利用gridview现实数据库单表数据
3个回答
展开全部
Sub bind()
Dim dw As String = Trim(DropDownList2.Text)
Dim jsnd As String = Trim(DropDownList1.Text) '
Dim dtcmd As SqlDataAdapter
Dim dt As New DataTable
Dim str1 As String
Dim Cnn As SqlConnection
Cnn = New SqlConnection(ConfigurationManager.AppSettings("connection"))
If dw = "请选择" Then
str1 = " where nd= '" + jsnd + "'"
Else
str1 = " where nd= '" + jsnd + "' and 单位= '" + dw + "'"
End If
Cnn.Open()
'*********************************************
str1 = "select * from ssgdc " + str1 + " order by 单位,id desc "
dtcmd = New SqlDataAdapter(str1, Cnn)
Dim dr As DataRow
If Me.GridView1.Rows.Count >= 0 Then
dr = dt.NewRow()
dt.Rows.Add(dr)
End If
'dt.Rows.Clear()
dtcmd.Fill(dt)
GridView1.DataSource = dt
GridView1.DataBind()
Cnn.Close()
End Sub
Dim dw As String = Trim(DropDownList2.Text)
Dim jsnd As String = Trim(DropDownList1.Text) '
Dim dtcmd As SqlDataAdapter
Dim dt As New DataTable
Dim str1 As String
Dim Cnn As SqlConnection
Cnn = New SqlConnection(ConfigurationManager.AppSettings("connection"))
If dw = "请选择" Then
str1 = " where nd= '" + jsnd + "'"
Else
str1 = " where nd= '" + jsnd + "' and 单位= '" + dw + "'"
End If
Cnn.Open()
'*********************************************
str1 = "select * from ssgdc " + str1 + " order by 单位,id desc "
dtcmd = New SqlDataAdapter(str1, Cnn)
Dim dr As DataRow
If Me.GridView1.Rows.Count >= 0 Then
dr = dt.NewRow()
dt.Rows.Add(dr)
End If
'dt.Rows.Clear()
dtcmd.Fill(dt)
GridView1.DataSource = dt
GridView1.DataBind()
Cnn.Close()
End Sub
迈杰
2024-11-30 广告
2024-11-30 广告
RNA-seq数据分析是转录组研究的核心,包括数据预处理、序列比对、定量分析、差异表达分析、功能注释和可视化等步骤。数据预处理主要是质量控制和去除低质量序列。序列比对使用HISAT2、STAR等工具将reads比对到参考基因组。定量分析评估...
点击进入详情页
本回答由迈杰提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询