Home > Archive > SQL Server JDBC > February 2006 > "varbinary(max)" data type is returning as "image" in MS SQL 2005









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author "varbinary(max)" data type is returning as "image" in MS SQL 2005
Sagar

2006-02-16, 3:23 am

I have defined the column as "varbinary(max)" in SQL server 2005. When I
tried to get the metadata using MS SQL server 2005 driver Version 1.0. I am
getting the column type as "image" and not "varbinary(max)". Is this bug in
driver?

See the following code for reference.

Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String url =
"jdbc:sqlserver:// idcdev3:1433;databas
eName=idcdevsql1;Sel
ectMethod=cursor";

Connection conn = DriverManager.getConnection(url,"sa","sadmin");
DatabaseMetaData dbMetaData = conn.getMetaData();
ResultSet columns = dbMetaData.getColumns("idcdevsql1", "dbo", "t1", null);
if (columns != null)
{
while (columns.next())
{
String name = columns.getString(4);
System.out.println("name " + name);
int dataType = columns.getInt(5);
String typeName = columns.getString(6);
System.out.println("typeName " + typeName);
}
}


Please let me know?

Thanks,
Sagar
Yesim Koman

2006-02-28, 8:24 pm

Hi Sagar,

Thank you for your input. We've verified that the issue you've run into is
indeed a bug. I will get back to you once we internally decide on when a
fix will be available. Thanks for your patience,

Yesim

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com