Does event execution depends on Internet connection
-
Hi all, I have a form where i capture some data that needs to be inserted into a main table and child table. These two have primary and foreign key relationships.For saving this type of data i wrote the following function sub SomeFN() { _main_id = Save_Main_Info()'_returns the newly inserted id in main For i As Integer = 0 To _Grid.Rows.Count - 1 Save_Details(_main_id) Next } Now since sometimes we are experiencing fluctuating internet,it happens that only main entry is saved, the details are not saved. This problem is not for every time. Also when i retry making the same entry later it gets saved(suggests that there no incorrect data due to which the data was not saved). Is it so that the connection gets broken when the control comes to for loop.Any ideas????:confused:
When you fail to plan, you are planning to fail.
-
Hi all, I have a form where i capture some data that needs to be inserted into a main table and child table. These two have primary and foreign key relationships.For saving this type of data i wrote the following function sub SomeFN() { _main_id = Save_Main_Info()'_returns the newly inserted id in main For i As Integer = 0 To _Grid.Rows.Count - 1 Save_Details(_main_id) Next } Now since sometimes we are experiencing fluctuating internet,it happens that only main entry is saved, the details are not saved. This problem is not for every time. Also when i retry making the same entry later it gets saved(suggests that there no incorrect data due to which the data was not saved). Is it so that the connection gets broken when the control comes to for loop.Any ideas????:confused:
When you fail to plan, you are planning to fail.
hi Dear Both Save Master and Save Detail Should be one Transaction, so that if any of one fails then it should automatically Rollback. Event execution is not depends upon internet connection. When even user send request to server it process by server at onces, and after that all processed data return back to client browser. Just one question , why u are using loop :^)
Sajid A.
-
hi Dear Both Save Master and Save Detail Should be one Transaction, so that if any of one fails then it should automatically Rollback. Event execution is not depends upon internet connection. When even user send request to server it process by server at onces, and after that all processed data return back to client browser. Just one question , why u are using loop :^)
Sajid A.
Since the stored proc used for inserting main and details are diff, i can`t use transaction. But i have a facility of using the Sqlcommands Transaction though.I have to use for loop to loop thriough the detail items. Is there any method where we can insert all the main as well as details at one go into the table.
When you fail to plan, you are planning to fail.