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. Multiple users inserting record at same time

Multiple users inserting record at same time

Scheduled Pinned Locked Moved ASP.NET
database
8 Posts 3 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.
  • V Offline
    V Offline
    vishnukamath
    wrote on last edited by
    #1

    Hi, I tried with "SqlTransaction" for multiple users inserting record at same time in my sample application , it is working fine in my sample application,It is not working in my Project , this project has one dynamic page in this page has 5 dynamic textboxes and 2 dropdown lists these controls i created in Page_PreInit and i need to save these controls data in database sqlserver 2005 , data saving properly in my system with vs2008,i created virtual directory for my project then we are trying to insert record then it inserting records is done successfully but data is not correctly inserted (data is been swapped between two user or more) Regards, Vishnu.

    N K 2 Replies Last reply
    0
    • V vishnukamath

      Hi, I tried with "SqlTransaction" for multiple users inserting record at same time in my sample application , it is working fine in my sample application,It is not working in my Project , this project has one dynamic page in this page has 5 dynamic textboxes and 2 dropdown lists these controls i created in Page_PreInit and i need to save these controls data in database sqlserver 2005 , data saving properly in my system with vs2008,i created virtual directory for my project then we are trying to insert record then it inserting records is done successfully but data is not correctly inserted (data is been swapped between two user or more) Regards, Vishnu.

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      vishnukamath wrote:

      data is been swapped between two user or more)

      I guess you may be using some global state. Are you using static (shared in VB) variables?

      Best wishes, Navaneeth

      V 1 Reply Last reply
      0
      • V vishnukamath

        Hi, I tried with "SqlTransaction" for multiple users inserting record at same time in my sample application , it is working fine in my sample application,It is not working in my Project , this project has one dynamic page in this page has 5 dynamic textboxes and 2 dropdown lists these controls i created in Page_PreInit and i need to save these controls data in database sqlserver 2005 , data saving properly in my system with vs2008,i created virtual directory for my project then we are trying to insert record then it inserting records is done successfully but data is not correctly inserted (data is been swapped between two user or more) Regards, Vishnu.

        K Offline
        K Offline
        Kasson
        wrote on last edited by
        #3

        Hope this[^]and Big resource[^] will give you an idea.

        With Regards, Kasson. When there is a conflict between the heart and the brain, let the heart be followed

        V 2 Replies Last reply
        0
        • N N a v a n e e t h

          vishnukamath wrote:

          data is been swapped between two user or more)

          I guess you may be using some global state. Are you using static (shared in VB) variables?

          Best wishes, Navaneeth

          V Offline
          V Offline
          vishnukamath
          wrote on last edited by
          #4

          hi, Thanks for the reply. but what do you exactly mean to say by '

          global state

          '. Is it necessary to use for multiple users inserting records at same time into the same table. Regards, Vishnu

          K 1 Reply Last reply
          0
          • K Kasson

            Hope this[^]and Big resource[^] will give you an idea.

            With Regards, Kasson. When there is a conflict between the heart and the brain, let the heart be followed

            V Offline
            V Offline
            vishnukamath
            wrote on last edited by
            #5

            Hi, Thank you for your reply , But i'm using Asp.net 3.5 with c# and sql server 2005, not VB 6.0. Regards, Vishnu.

            1 Reply Last reply
            0
            • V vishnukamath

              hi, Thanks for the reply. but what do you exactly mean to say by '

              global state

              '. Is it necessary to use for multiple users inserting records at same time into the same table. Regards, Vishnu

              K Offline
              K Offline
              Kasson
              wrote on last edited by
              #6

              Hope this[^]will give you an idea.

              With Regards, Kasson. Birth is a mistake you'll spend your whole life trying to correct.

              V 1 Reply Last reply
              0
              • K Kasson

                Hope this[^]will give you an idea.

                With Regards, Kasson. Birth is a mistake you'll spend your whole life trying to correct.

                V Offline
                V Offline
                vishnukamath
                wrote on last edited by
                #7

                Hi , Thank you for your reply, Multiple users accessing same dynamic page ,if two users trying to insert on same page and same table , it is inserting two records but first record or second might be getting null values in all columns in table. please suggest me better way. Regards, Vishnu.

                1 Reply Last reply
                0
                • K Kasson

                  Hope this[^]and Big resource[^] will give you an idea.

                  With Regards, Kasson. When there is a conflict between the heart and the brain, let the heart be followed

                  V Offline
                  V Offline
                  vishnukamath
                  wrote on last edited by
                  #8

                  Hi , My issue Solved , so don't waste your valuable time. Regards, Vishnu.

                  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