This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Date Type  RSS feed

 
sandy yang
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I using MS SQL Server's Northwind database as my simple database,
I try to display information form Employees table, the data type is "TEXT" for employee's name in SQL Server. My question is: What's the matching java type for it? when I use resultSet.getObject, the program runs, and the column is blank, no employee's name will display. when I use ResultSetMetaData.getColumnTypeName, I get the data is "nvarchar". I can't find the matching java data type for it.
Thanks!
 
David Freels
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using resultSet.getString. The Oracle JDBC driver has problems with the getObject method so maybe your driver does as well.

UPDATE:
I was just informed by a SQL Server admin that the nvarchar is a UNICODE field.
Hope this helps.
David
[This message has been edited by David Freels (edited March 09, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!