现有一个Oracle数据表,表名为“worker”,共有3列字段,分别为ID,Name,Age。
我现在想用vb.NET编程,以得到列字段的信息,如字段的类型、字段定义的长度等。如何进行?
我的语句是这样的(假定数据集名称为tmpDataSet):
DIM tmpColType as OracleDbType
DIM tmpColLen as Integer
tmpColType=tmpDataSet.Tables("worker").Columns(0).DataType()
tmpColLen=tmpDataSet.Tables("worker").Columns(0).MaxLength
上述语句,程序运行发生了错误,为什么?请各位大侠指点,急,急
我现在想用vb.NET编程,以得到列字段的信息,如字段的类型、字段定义的长度等。如何进行?
我的语句是这样的(假定数据集名称为tmpDataSet):
DIM tmpColType as OracleDbType
DIM tmpColLen as Integer
tmpColType=tmpDataSet.Tables("worker").Columns(0).DataType()
tmpColLen=tmpDataSet.Tables("worker").Columns(0).MaxLength
上述语句,程序运行发生了错误,为什么?请各位大侠指点,急,急
然后获取这个dataset的字段元信息即可。
你在这里可以得到所有字段的信息。
where owner='数据库' and table_name='表