See more:
(untagged)
I have hierarchical database the database structure is below I have users into my application and these users are associated with different locations and these locations are cascade in nature ....
District----->populates------>Tehsils
Tehsils------>populates----->UC
UC------->populates------>villages
For that purpose I have created 5 tables
User(userid(P),UserName)
DistrictAssociation(districtID(P),DistrictName,UserID(F))
TehsilAssociation(TehsilID(P),TehsilName,DistrictID(F),UserID(F))
UCAssociation(UCID(P),UCNAME,UserID(F),TehsilID(F))
VillageAssociation(VillageID(P),VIllageName,UCID(F),UserID(F))
To save all these Id I am Using Four Table Value Parameter for all Association Table and simple Stored Procedure for basic UserID And Name .
On Each Table Value paramter as u know from the above struct If i am taking the UCAssociation Table as an example then for every uc i have to need its tehsil so i made a function passing uc id and getting tehsil id , so the whole process takes unexpected time to save and the first three table value parameter work but the last villageAssocaition does not work it work fine localy but on live it become in loop of wait and never end and when i check the db it show the first three table value but not the last one on live environment but locally all work fine .