Dim ConnectionStr As string="database=InvertedSoftware;server=反向软件"
Dim objConnection As SqlConnection=新的SqlConnection(ConnectionStr)
Dim categoryDataAdapter As SqlDataAdapter=新的SqlDataAdapter()
categoryDataAdapter.TableMappings.Add("表","类别")
objConnection.Open()
Dim objCommand As SqlCommand=新的SqlCommand("SELECT*FROMtbl_category",objConnection)
objCommand.CommandType=命令类型.Text
categoryDataAdapter.SelectCommand=objCommand
Dim objDataSet As DataSet=新数据集("库存")
categoryDataAdapter.Fill(objDataSet)
JDBC中没有DataTable
的确切等价物。最接近的可能是CachedRowSet
。