0

I have defined a class FieldProperty with some of properties corresponding to field defined in it.ArrayList object contains objects of class 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

gbn
  • 422,506
  • 82
  • 585
  • 676
Maddy.Shik
  • 6,609
  • 18
  • 69
  • 98

1 Answers1

1

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

gbn
  • 422,506
  • 82
  • 585
  • 676