Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Does event execution depends on Internet connection

Does event execution depends on Internet connection

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    www Developerof NET
    wrote on last edited by
    #1

    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.

    S 1 Reply Last reply
    0
    • W www Developerof NET

      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.

      S Offline
      S Offline
      Sajid A
      wrote on last edited by
      #2

      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.

      W 1 Reply Last reply
      0
      • S 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.

        W Offline
        W Offline
        www Developerof NET
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups