Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invoke SQL server 2008 stored procedure from java and mapping pojo with Custom Database type

Poonam Kadu
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have declared a UDT(User Defined Types) say CustomType in SQL server 2008.I m using this Data type as an IN parameter for a Stored
procedure.I want to call this procedure from a java class.
To do this i have done the following:
created a class called CustomType which implements SQLData

My main java class looks like this:

when i run this code i get the following exception: This operation is not supported.
at Source)
at Source)
at Source)
at com.mindcraft.test.Proc2Test.msmsqlTest(
at com.mindcraft.test.Proc2Test.main(

This exception occurs at con.setTypeMap(map)

My problem is how do i call a store proc of SQL server, whose input parameter is a custom Database type?
How do i map the a pojo with custom database type of SQL server 2008 and send that to the stored proc ?
Does sql server 2008 jdbc driver implement Connection.setTypeMap() method?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic