0

我在使用 Vb.Net 制作的软件时出错。我不知道在哪里看,谷歌也没有帮助我。我可以找个地方试试吗?

System.ArgumentException: Column 'CHARACTER_OCTET_LENGTH' does not belong to table .
   at System.Data.DataColumnCollection.Remove(String name)
   at MySql.Data.MySqlClient.ISSchemaProvider.GetColumns(String[] restrictions)
   at MySql.Data.MySqlClient.SchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
   at MySql.Data.MySqlClient.ISSchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
   at MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String[] restrictions)
4

1 回答 1

0

您似乎正在使用 DataTable 并且您尝试使用的列不属于它。CHARACTER_OCTET_LENGTH 是列名,它只是令人困惑。

Dim tbl As New DataTable
tbl.Columns.Remove("aa")

结果

Message=Column 'aa' does not belong to table .
  Source=System.Data
  StackTrace:
       at System.Data.DataColumnCollection.Remove(String name)
       at dbpokusy.net.Module1.AddConstantToQuery() in C:\...
于 2012-05-03T09:50:22.357 回答