开发者

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.

  1. Either send as CSV/XML etc amd parse into a table Arrays and Lists in SQL Server

  2. Use parameters, one per field (makes sense if fixed number of attributes per type)

  3. Staging table/bulk upload, copy to final table as part of stored proc call afterwards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜