并且享用GridView显示出来
这样数据绑定就要在代码中写
那我应该怎样写呢?
2007-04-29 10:46
2007-04-29 11:07
如果是C/S就是直接绑定GridView.DataSource = 数据源 就行了
如果是B/S GridView.DataSource = 数据源 选择之后需要 将数据源进行GridView.DataBind()的绑定

2007-04-29 11:07
2007-04-29 15:41
2007-04-29 15:43
2007-04-29 15:46
2007-04-29 15:51
具体的语句如下:
Dim slt As String = CType(Session("slt"), String)
Dim table As String = CType(Session("table"), String)
Dim SQL As String = CType(Session("SQL"), String)
Dim str As String = "Provider=MSDAORA.1;data source=kksb;user id=kksb;password=kksb2007;"
Dim conn As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(str)
Dim strSQL As String = " SELECT " & SQL & " FROM " & table & " WHERE " & slt
Response.Write(strSQL)
Dim comm As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand(str, conn)
GridView1.DataSource = comm.ExecuteReader
GridView1.DataBind()
conn.Close()
报错说:无效的SQL语句

2007-04-29 15:52

2007-04-29 16:14

2007-04-29 16:30