oracle数据库怎么读取数据显示在GRIDVIEW中,是窗体程序。
1个回答
展开全部
VB的话
Protected Sub btnGetData_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Sql As String
cnn.Open()
Sql = "SELECT的SQL文 "
Sel = New OracleCommand(Sql, cnn)
Dim adapter As New OracleDataAdapter(Sel)
Dim dsData As New DataSet
adapter.Fill(dsData, "data")
GridView1.DataSource = dsData
GridView1.DataBind()
cnn.Close()
End Sub
Protected Sub btnGetData_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Sql As String
cnn.Open()
Sql = "SELECT的SQL文 "
Sel = New OracleCommand(Sql, cnn)
Dim adapter As New OracleDataAdapter(Sel)
Dim dsData As New DataSet
adapter.Fill(dsData, "data")
GridView1.DataSource = dsData
GridView1.DataBind()
cnn.Close()
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询