Insert statement take a longer time in live server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saion
    New Member
    • Aug 2009
    • 4

    Insert statement take a longer time in live server

    Let I have a page with displaying some data. My list page can display all data means page can connect with sql server & read data but when i am in entry page & click to save then it will take longer time in live server & finally failed. Note that in my development PC it worked nicely. And the commandtimeout is 0. Thats page try to save longer time but finally failed.

    Please write your observation.
  • PRR
    Recognized Expert Contributor
    • Dec 2007
    • 750

    #2
    Your development pc is obviously different from your deployment pc.

    1. Look into connection string you are using to connect to your DB server.
    2. Timeout can be set to something higher. Default is 15 sec [MSDN]
    Code:
    ConnectionString = "username=;password=;database=northwind;server=mySQLServer;Connect Timeout=30";

    Comment

    • saion
      New Member
      • Aug 2009
      • 4

      #3
      Hi Moderator,
      Thanks for your reply. By increasing the connection timeout to 60 didn't resolve my problem. Note that All select statement will run smoothly but when i want to save data then IE progress bar indicator is going on & on. Another thing is yes i have hosted the project into different server.

      Comment

      • PRR
        Recognized Expert Contributor
        • Dec 2007
        • 750

        #4
        Check if your connectionstrin g is valid...Are you using windows authentication for accessing database?

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by saion
          Hi Moderator,
          Thanks for your reply. By increasing the connection timeout to 60 didn't resolve my problem. Note that All select statement will run smoothly but when i want to save data then IE progress bar indicator is going on & on. Another thing is yes i have hosted the project into different server.
          Are you sure that the database user account with which you're saving the data to the database has permissions to do so?

          Have you checked the Windows Event logs on the server to see if there are any error/warning messages pertaining to your application logged there?

          Comment

          • saion
            New Member
            • Aug 2009
            • 4

            #6
            No i didnot use windows authentication to connect to the database. We have 5 affiliates & my application is hosted in our central server. All 4 affiliates can do everything except my affiliate. I thought that here may be some network admin related issues which i cant identify yet. Note it that i can access the data list but cant insert.

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Well, make sure that the database administrator has set up your database user account with "insert/update" permissions.

              Comment

              • saion
                New Member
                • Aug 2009
                • 4

                #8
                I have already assured that the user has enough permission since other affiliates(in other country) also uses my connection string. I thougt that few settings in my lan may cause the reason such as port etc.. But i can't figure out it. Plz help

                Comment

                Working...