想问问这两个函数的返回值有什么区别?
Public Function GetProduct_Info(ByVal Name As String) As DataTable
conn.Open()
Access = "Select * from Product_Info order by ID "
Adcmd = New OleDbDataAdapter(Access, conn)
Dim dt As New DataSet
Adcmd.Fill(dt, "Product_Info ")
conn.Close()
Return dt.Tables( "Product_Info ")
End Function
----------------------------------------
Public Function GetProduct_Info(ByVal Name As String) As DataTable
conn.Open()
Access = "Select * from Product_Info order by ID "
Adcmd = New OleDbDataAdapter(Access, conn)
Dim dt As New Datatable
Adcmd.Fill(dt)
conn.Close()
Return dt
End Function
想问问这两个函数的返回值有什么区别?
------解决方案--------------------区别就是返回表一个有表名,一个没有表名。。。。
------解决方案--------------------同意楼上
------解决方案--------------------没什么区别,有区别就如上面所说一个有表名,一个没有表名,但这个表名我们一般用不上