无法读取Varchar(最大) [英] Cannot Read Varchar(max)

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

问题描述

大家好,

考虑到新的varchar(max)类型我已经更改了一些表中的一些文本列。

问题是SQL Native Client 2005.90.1399.00。 odbc驱动程序没有

返回此varchar(max)列的任何值。

如果我使用旧的odbc驱动程序SQL Server 2000.85.117.00它可以正常工作。


知道为什么这不适合2005年的司机吗?


谢谢


_______________
Fabio F,Fullin

cel:15-5479-1821

Hi all,
considering the new varchar(max) type I have changed some text columns in
some tables.
The problem is the "SQL Native Client 2005.90.1399.00" odbc driver does not
return any value for this varchar(max) column.
If I use the old odbc driver SQL Server 2000.85.117.00 it works fine.

Any idea why this is not working with the 2005 driver?

Thanks

_______________
Fabio F, Fullin
cel: 15-5479-1821

推荐答案

要考虑的一件事SQL Native Client ODBC驱动程序是

VARCHAR(MAX)没有固定大小,ODBC驱动程序通过返回最大列大小为0来表示

。可以混淆你的申请

如果它没有检查0作为一个特例。请参阅此

文章的底部:
http://msdn.microsoft.com/en-us/library/ms130896.aspx


但总的来说我还没有看到这种情况发生使用我的任何.NET应用程序

,因为它在ADO.NET中正确处理。


HTH,


Plamen Ratchev
http://www.SQLStudio.com

One thing to consider with the SQL Native Client ODBC driver is that
VARCHAR(MAX) has does not have fixed size and the ODBC driver represents
this by returning a max column size of 0. This can confuse your application
if it doesn''t check for 0 as a special case. See the bottom section of this
article:
http://msdn.microsoft.com/en-us/library/ms130896.aspx

But in general I have not seen this happen with any of my .NET applications
as it is handled properly in ADO.NET.

HTH,

Plamen Ratchev
http://www.SQLStudio.com


谢谢,我之前找到了这样的答案。但它并不是最大值

因为

司机根本没有返回任何信息。

Plamen Ratchev < Pl **** @ SQLStudio.com写了留言

新闻:a6 ************************** ****@speakeasy.ne t ...
Thanks, I found this kind of answers before. But it''s not about the max
because
the driver does not return any information at all.
"Plamen Ratchev" <Pl****@SQLStudio.comwrote in message
news:a6******************************@speakeasy.ne t...

SQL Native Client ODBC驱动程序要考虑的一件事是

VARCHAR (MAX)没有固定的大小,并且ODBC驱动程序通过返回最大列大小为0来表示

。这可能会使您的

应用程序混淆,如果它没有'' t检查0作为特例。请参阅本文的底部

部分:
http://msdn.microsoft.com/en-us/library/ms130896.aspx


但总的来说我还没有看到这种情况发生使用我的任何.NET

应用程序,因为它在ADO.NET中正确处理。


HTH,


Plamen Ratchev
http://www.SQLStudio.com



您的应用程序是什么,.NET还是其他什么?如果您将列更改为VARCHAR(8000)或TEXT,会发生什么情况,您看到任何值吗?您运行的

查询是什么?


HTH,


Plamen Ratchev
http://www.SQLStudio.com

What is your application, .NET or something else? What happens if you change
the column to VARCHAR(8000) or TEXT, do you see any values? What is the
query that you run?

HTH,

Plamen Ratchev
http://www.SQLStudio.com


这篇关于无法读取Varchar(最大)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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