阅读背景:

SQL Server 2012 getClob():不支持从varchar(nvarchar)到CLOB的转换

来源:互联网 

I wonder what am I doing wrong in the scenario described below. I assessing some SQL Server versions for a project, and playing around with different DB types in a simple Java setting. I use Eclipse, Java 6 (1.6u45), driver sqljdbc4.jar, Sql Server 2012 (default installation), Windows 7, and I'm trying to write and read back from a test database/table different DB types. For columns of type NVARCHAR(n or max) and/or VARCHAR(n or max) write to DB using setClob() and setCharacterStream() methods without any problems. But, when I try to read back the Clobs I can only use getCharacterStream(). For reasons that I cannot understand I cannot use getClob() with either of the DB types listed above. I get the following exception stack:I wonder what am I doing wrong in the scenario




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: