Is it possible to pass an arraylist object to sql procedure with sql server 2000 and java 1.4?
I have defined a class FieldProperty with some of properties corresponding to field defined in it.ArrayList object contains objects of cla开发者_如何学JAVAss FieldProperty. now i want to store data in table .There is one record in table corresponding to each object of FieldProperty.if i call query for each record insertion.It will be very slow.Is there any way to pass object of arraylist to stored procedure and then i can retrieve data in stored procedure ?If this is not possible,What is best solution for this problem?
Platform Info Sql server 2000 java 1.4
Yes.
Either send as CSV/XML etc amd parse into a table Arrays and Lists in SQL Server
Use parameters, one per field (makes sense if fixed number of attributes per type)
Staging table/bulk upload, copy to final table as part of stored proc call afterwards
精彩评论