我有以下代码
Dim dbMnt As OleDb.OleDbConnection
dbMnt = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\temp\data.mdb")
dbMnt.Open()
Dim qdfTabCols As DataTable = dbMnt.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Columns, New Object(){Nothing, Nothing, "Table1")
Dim dr As DataRow
For Each dr In qdfTabCols
Msgbox(dr("TABLE_NAME") & " " & dr("COLUMN_NAME") & " " & dr("DATA_TYPE"))
'In here I would like to test the column data type
Next
在“For Each”内部,我想测试各种列数据类型并以不同方式处理它们。我以前只使用:dbText、dbMemo、dbDate。您如何在 VB.net 中编写此“If”语句?
If (dr("DATA_TYPE") = ????) Then