....省去
Set rs = conn.OpenSchema(adSchemaTables, Array(Empty, Empty,Empty, "Table"))
Do While Not rs.EOF
msgbox rs!Table_name
rs.MoveNext
Loop
在vb.net中改写成如下代码,不想得到的结果却是两回事,请诸位指点一下问题出在哪了?
Do Until rs.EOF
rs = conn.OpenSchema(ADODB.SchemaEnum.adSchemaTables, New Object() {Nothing, _
Nothing, nothing, "TABLE"})
msgbox rs("Table_name").tostring()
loop
结果总是:ADODB.InternalField
可以查看某表是否在库里结果却是正确的.
rs = conn.OpenSchema(ADODB.SchemaEnum.adSchemaTables, New Object() {Nothing, Nothing, SearchOutTable, "TABLE"})
结果rs.recound=1
有人知道是什么原因,我应该怎样做才能正确得到所有的表名?
1 个解决方案
#1
msgbox rs("Table_name").
Value.ToString()
#1
msgbox rs("Table_name").
Value.ToString()