Function getcabbagetittle() As System.Data.IDataReader
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; data source="+server.MapPath("data/date.mdb")
Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)
Dim queryString As String = "SELECT [cabbage].[cabbage_tittle],[cabbage].[cabbage_id] FROM [cabbage]"
Dim dbCommand As System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
dbConnection.Open
Dim dataReader As System.Data.IDataReader = dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Return dataReader
End Function' Insert page code here
dim SelectedTeam as String
Sub Page_Load()
cabbagetittlelist.DataSource =getcabbagetittle()
cabbagetittlelist.DataBind()
End Sub
.style4 {color: #FF0000; font-size: medium;}
-->
种植关键技术
智能决策
专家论坛
在线答疑