I have 4 table
District(districtid(P),Districtname)
Tehsil(Tehsilid(P),Tehsilname,DistrictID(F))
UC(UCid(P),UCname,TehsilID(F))
Village(Villageid(P),Villagename,UCID(F))
F Stand for Foreign key and P for Primary key
I am using table value parameter for bulk insert but on each row I have to call a method to get the ID for example if i take an exmaple of saving the 200 villages the The village id comes from check box for for its UC I have to call a method in vb.net code and then this method get out the UC id of that village so it makes my process slow any solution????
Loading

Danish HabibPosted Apr 15, 2015, 12:35 PM
Like (districtid(P),DistrictName)
2nd table((P)UCID,UCNAme,DistrictID(F))
P for PRimary key and F for foreign key
Dim Ucid As Integer = GetTehsilIDIds(CheckBoxList3.Items(i3).Value)
i am using that line in code so if 200 rows i have then 200 times that method called so it makes my insertion process slow
Shakti Singh DulawatPosted Apr 15, 2015, 10:38 AM