OdbcDataReader .GetSchemaTable()的问题 [英] problem with OdbcDataReader .GetSchemaTable()

查看:149
本文介绍了OdbcDataReader .GetSchemaTable()的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

dears



现在我有一个超过300列的巨大表格,当我使用以下代码时





OdbcDataReader DbReader = DbCommand.ExecuteReader();

DataTable MyTable = DbReader.GetSchemaTable();



i我只得到255列



我该怎么办?

dears

now i have a huge table with more than 300 column , when i used the following code


OdbcDataReader DbReader = DbCommand.ExecuteReader();
DataTable MyTable = DbReader.GetSchemaTable();

i am getting only 255 columns only

what should i do??

推荐答案

这里有 MSDN文档中的以下注释 [ ^ ]:

There's the following note in the MSDN documentation[^]:
确保元数据列返回正确的信息,您必须使用设置为 KeyInfo 的行为参数调用ExecuteReader。否则,架构表中的某些列可能会返回默认值,空值或不正确的数据。
To make sure that metadata columns return the correct information, you must call ExecuteReader with the behavior parameter set to KeyInfo. Otherwise, some of the columns in the schema table may return default, null, or incorrect data.


这篇关于OdbcDataReader .GetSchemaTable()的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆