DataRowAdding 新增行时
'寻找系统必备列 如果没有那就增加
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
For Each nm As String In Connections("erp2019").GetTableNames
cmd.CommandText = "SEL ECT * F rom " & nm & " where false"
dt = cmd.ExecuteReader()
If dt.datacols.contains("Log") Then
Else
dt.datacols.AddColumn("Log" ,ADOXType.String, 50) '增加字符型列,长度指定为12
End If
Next
---------------------------
错误
---------------------------
编译错误:“AddColumn”不是“DataColCollection”的成员。
错误代码:dt.datacols.AddColumn("Log" ,ADOXType.String, 50) '增加字符型列,长度指定为12
---------------------------
确定
---------------------------