如何使用经典 ASP 页面从 Oracle 数据库读取 NCLOB、CLOB 数据值?

发布于 2024-10-17 13:00:17 字数 459 浏览 1 评论 0原文

我收到以下错误: Microsoft OLE DB Provider for Oracle:不支持数据类型。

有人可以帮我解决这个问题吗...

情况: 最近将数据库从 SQL Server 2005 迁移到 Oracle 11g。其中一张表有一些 SQL Server 中数据类型为 ntext 的列,这些列在迁移到 Oracle 期间被转换为 NCLOB。客户端是经典 ASP 页面 (VBScript),通过 OLEDB 连接访问 Oracle 数据库。 当执行到达读取 NCLOB 类型列的查询(选择查询)时,它会抛出 Microsoft OLE DB Provider for Oracle:不支持数据类型 错误。当我取出该特定列时,查询运行良好...

问题:如何从经典 ASP 页面读取 NCLOB、CLOB 数据值?

如果您需要更多信息,请告诉我......

谢谢......

I am getting the following error:
Microsoft OLE DB Provider for Oracle: Data type is not supported.

Could somebody help me figure out this please...

Situation:
Recently migrated database from SQL Server 2005 to Oracle 11g. One of the table has some columns of the data type ntext in SQL Server, which were converted to NCLOB during migration to Oracle. Client is Classic ASP page (VBScript) accessing the Oracle Database through OLEDB connection.
When the execution reaches the query (Select query) that reads the column of type NCLOB it is throwing the Microsoft OLE DB Provider for Oracle: Data type is not supported error. When I take out that particular column then the query is running fine...

QUESTION: How to read NCLOB, CLOB data values from Classic ASP pages?

Plz let me know if you need more information.....

Thank You..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

漆黑的白昼 2024-10-24 13:00:17

我知道 Microsoft 的 Oracle ODBC 驱动程序不支持任何 LOB 类型——我敢打赌它的 OLE DB 提供程序也不会给出错误。可以升级到 Oracle OLE DB Provider 吗?

顺便说一句,由于您要从 SQL Server 迁移到 Oracle,您真的需要使用 NCLOB 数据类型吗?由于 Oracle 允许数据库字符集为 Unicode,因此您通常不需要(也不想)使用 NVARCHAR2 或 NCLOB 数据类型,除非您必须支持需要非 Unicode 字符集的旧数据库。对于本质上是英语或西欧语的数据,将数据存储在 CLOB 中在存储空间方面具有显着的优势,因为 CLOB 将以 UTF-8 而不是 UTF-16 格式存储在 NCLOB 中(假设您选择了 Unicode)数据库的字符集)。消除 NVARCHAR2 和 NCLOB 列也往往会使前端工具更容易处理数据。

I know that Microsoft's ODBC Driver for Oracle didn't support any of the LOB types-- I would wager that its OLE DB Provider didn't either given the error. Can you upgrade to the Oracle OLE DB Provider?

As an aside, since you are migrating from SQL Server to Oracle, do you really need to use the NCLOB data type? Since Oracle allows the database character set to be Unicode, you normally don't need (and don't want) to use the NVARCHAR2 or NCLOB data types unless you're stuck supporting an old database that requires a non-Unicode character set. For data that is English or Western Eurpoean in nature, storing data in a CLOB has substantial benefits in terms of storage space since the CLOB would store the data in UTF-8 rather than UTF-16 in an NCLOB (assuming that you picked a Unicode character set for the database). Eliminating the NVARCHAR2 and NCLOB columns also tends to make it much easier for front-end tools to handle the data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文