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. Database & SysAdmin
  3. Database
  4. Optimizing crystal report

Optimizing crystal report

Scheduled Pinned Locked Moved Database
databasehelpcsharpsql-server
8 Posts 4 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.
  • P Offline
    P Offline
    Pradip Kishore
    wrote on last edited by
    #1

    hi all i am having a stored procedure in my database which will take 2 parameters and return a resultset which i want to display in a crystal report.when i am executing the store proc. alone with the paramaters in the query analyser of sql server 2000,it is taking around 2.5 min.but when i pass the parameters from a vb.net page page,it z showing an error:{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."} please help me out to solve this problm.. thanks in advance

    i am Pradip Kishore

    K P D 3 Replies Last reply
    0
    • P Pradip Kishore

      hi all i am having a stored procedure in my database which will take 2 parameters and return a resultset which i want to display in a crystal report.when i am executing the store proc. alone with the paramaters in the query analyser of sql server 2000,it is taking around 2.5 min.but when i pass the parameters from a vb.net page page,it z showing an error:{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."} please help me out to solve this problm.. thanks in advance

      i am Pradip Kishore

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      The command timeout defaults to like 30 seconds, so you would need to change this so you don't get a timeout error. There is a property off of the sqlCommand object called CommandTimeout. It is in seconds. Hope that helps. Ben

      1 Reply Last reply
      0
      • P Pradip Kishore

        hi all i am having a stored procedure in my database which will take 2 parameters and return a resultset which i want to display in a crystal report.when i am executing the store proc. alone with the paramaters in the query analyser of sql server 2000,it is taking around 2.5 min.but when i pass the parameters from a vb.net page page,it z showing an error:{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."} please help me out to solve this problm.. thanks in advance

        i am Pradip Kishore

        P Offline
        P Offline
        Paul Conrad
        wrote on last edited by
        #3

        Have you looked at optimizing the stored procedure?

        P 1 Reply Last reply
        0
        • P Pradip Kishore

          hi all i am having a stored procedure in my database which will take 2 parameters and return a resultset which i want to display in a crystal report.when i am executing the store proc. alone with the paramaters in the query analyser of sql server 2000,it is taking around 2.5 min.but when i pass the parameters from a vb.net page page,it z showing an error:{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."} please help me out to solve this problm.. thanks in advance

          i am Pradip Kishore

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Pradip Kishore wrote:

          but when i pass the parameters from a vb.net page page,it z showing an error:{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}

          The default CommandTimeout for an SqlCommand object is 30 seconds. If your query doesn't return a result set in that time, you get this error. Either you have to optimize the stored procedure and/or table structures (indexes!), and/or up the timeout in the SqlCommand object. If it's taking 2.5 minutes to return a set, are you sure that this is as fast as your query can execute?

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          P 1 Reply Last reply
          0
          • P Paul Conrad

            Have you looked at optimizing the stored procedure?

            P Offline
            P Offline
            Pradip Kishore
            wrote on last edited by
            #5

            hi thanks for your response IS there any way to optimize a stored procedure for quick data retrival.. please help me thanks in advance..

            i m pradip kishore

            P 1 Reply Last reply
            0
            • D Dave Kreskowiak

              Pradip Kishore wrote:

              but when i pass the parameters from a vb.net page page,it z showing an error:{"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}

              The default CommandTimeout for an SqlCommand object is 30 seconds. If your query doesn't return a result set in that time, you get this error. Either you have to optimize the stored procedure and/or table structures (indexes!), and/or up the timeout in the SqlCommand object. If it's taking 2.5 minutes to return a set, are you sure that this is as fast as your query can execute?

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              P Offline
              P Offline
              Pradip Kishore
              wrote on last edited by
              #6

              Hi thanks for your response.. but can you show me some sample code or any links by which i can be able to do this..? thanks in advance..

              pradip kishore

              D 1 Reply Last reply
              0
              • P Pradip Kishore

                hi thanks for your response IS there any way to optimize a stored procedure for quick data retrival.. please help me thanks in advance..

                i m pradip kishore

                P Offline
                P Offline
                Paul Conrad
                wrote on last edited by
                #7

                Pradip Kishore wrote:

                IS there any way to optimize a stored procedure for quick data retrival..

                In short, you need to look at where bottlenecks are. Without having any idea how your database is set up, I can't really help. Any queries you have in the stored proc, analyze it through query analyzer... Paul

                1 Reply Last reply
                0
                • P Pradip Kishore

                  Hi thanks for your response.. but can you show me some sample code or any links by which i can be able to do this..? thanks in advance..

                  pradip kishore

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  I already gave it to you. The CommandTimeout property of your SqlCommand objects you created! As far as optimization goes. That's done with experience and trial and error. There is no code that will just "do it for you". You have to understand precisely how SQL Server works, how Indexes work and why. What are the consequences of using them and overusing them. And on and on and on...

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  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