Hello All,In searching the web for this, it seems very few people have tried or think it may be impossible. I'm really hoping someone here may have an answer to it:I'm newer to Java, but very experience in C# and have found most of what I need. I've figured out how to call a stored procedure(MS SQL 2008) with Java, but I cannot seem to find how I would pass a User Defined Table Type as an input:The table type:CREATE TYPE [dbo].[MyTableType] AS TABLE( [id] [int] NOT NULL, [year] [int] NOT NULL, [day] [int] NOT NULL, [month] [int] NOT NULL)
The stored procedure:CREATE PROCEDURE dbo.InsertSomeData @myData MyTableType READONLYASBEGIN insert into PermanentDataTable ([id], [year], [day], [month]) select * from @myDataEND
Very simple and tested.... Now how do I call this from Java:String sql = "exec dbo.InsertSomeData @myData=?";PreparedStatement ps = connection.prepareStatement(sql);ps.setEscapeProcessing(true);ps.setThatThingIWantToDo(1, arrayOfData); // <-- This part is where I'm stuck
Thanks in advance for any help