System.Type到OleDbType [英] System.Type to OleDbType

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

问题描述

我在OleDbDataReader上循环以获取MS Access表中列的名称和类型.

但是我需要将System.Type转换为OleDbType.

有任何想法吗?

I''m looping on a OleDbDataReader in order to get the names and the types of the columns in an MS Access table.

But I need to convert the System.Type returned to OleDbType.

Any Idea??

推荐答案

有一种方法此处完成此操作的[ ^ ].似乎没有一种内置的方式,或者至少我找不到一个.
There is a Method here[^] that does it. There does not seem to be a built in way, or at least I couldn''t find one.


但是您提到的OleDbType类型实际上是一个Enum ,则只能具有命名值.

现在如何将int值1000转换为OleDbType.

我不这么认为.
But the type you have mentioned OleDbType, it is actually a Enum, then can have only named value.

Now how can you convert your int value 1000 to OleDbType.

I dont think so.


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

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