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. General Programming
  3. C#
  4. How to handle Image/Data from Centralized SQL Server

How to handle Image/Data from Centralized SQL Server

Scheduled Pinned Locked Moved C#
helpquestioncsharpdatabasesql-server
10 Posts 5 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.
  • H Offline
    H Offline
    Hema Bairavan
    wrote on last edited by
    #1

    Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan

    L V J H 4 Replies Last reply
    0
    • H Hema Bairavan

      Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hema Bairavan wrote:

      Now my problem is when i try to connect the SQL Server via internet

      Your second problem is security; check out if there are a lot of foreigners trying to log in, that might kill performance a bit. It'd be better to have the Sql server expose it's data over a webservice.

      Hema Bairavan wrote:

      am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server.

      Again, are you sure? Isn't it just a query that's taking a lot of time? Did you ask for the "statistics" in Sql management Studio?

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]

      H 1 Reply Last reply
      0
      • H Hema Bairavan

        Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #3

        The first thing you might look at is the size of the images. Depending on it's usage you might want to save a copy with less quality (tuned for webapplications eg). If quality is needed I would look into saving the images on disc and providing the link and/or caching. From a speed point of view, the webservice will probably slow you down, but you might find it easier managable to go through a web service. As long as the application is running on the inside, you can get away with the security, but if someone external wants to use it you better use a webservice. If all that doesn't help to improve performance you need to have a look at the database and/or the application. Is the database tuned and indexed correctly (does it need to be re-indexed?). Is your application not doing things unnecessary like fetching/loading the image multiple times during copies from memory objects eg. hope this helps.

        V.
        (MQOTD Rules and previous Solutions )

        H 1 Reply Last reply
        0
        • L Lost User

          Hema Bairavan wrote:

          Now my problem is when i try to connect the SQL Server via internet

          Your second problem is security; check out if there are a lot of foreigners trying to log in, that might kill performance a bit. It'd be better to have the Sql server expose it's data over a webservice.

          Hema Bairavan wrote:

          am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server.

          Again, are you sure? Isn't it just a query that's taking a lot of time? Did you ask for the "statistics" in Sql management Studio?

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]

          H Offline
          H Offline
          Hema Bairavan
          wrote on last edited by
          #4

          Dear Eddy, First of all thanks for your time to replying to me.. Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue. And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more. So getting into webservices will solve my problem? but how about images through web services?

          P L 2 Replies Last reply
          0
          • H Hema Bairavan

            Dear Eddy, First of all thanks for your time to replying to me.. Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue. And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more. So getting into webservices will solve my problem? but how about images through web services?

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            Ultimately, an image is just an array of bytes. There's a huge hint.

            *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

            "Mind bleach! Send me mind bleach!" - Nagy Vilmos

            CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

            1 Reply Last reply
            0
            • V V 0

              The first thing you might look at is the size of the images. Depending on it's usage you might want to save a copy with less quality (tuned for webapplications eg). If quality is needed I would look into saving the images on disc and providing the link and/or caching. From a speed point of view, the webservice will probably slow you down, but you might find it easier managable to go through a web service. As long as the application is running on the inside, you can get away with the security, but if someone external wants to use it you better use a webservice. If all that doesn't help to improve performance you need to have a look at the database and/or the application. Is the database tuned and indexed correctly (does it need to be re-indexed?). Is your application not doing things unnecessary like fetching/loading the image multiple times during copies from memory objects eg. hope this helps.

              V.
              (MQOTD Rules and previous Solutions )

              H Offline
              H Offline
              Hema Bairavan
              wrote on last edited by
              #6

              Dear V, First of all thanks for your time to replying to me. I have restricted the application to store the image size only less than 50kb, and even there also am getting problem. And i hope i could go for the option you said saving in the disk but once again as an windows application accessing image from a shared drive??? and regarding the security none other than me or my application is going to log in to the application none other foreigners. And i have only 5 records in my table.. Is there indexing will apply in this case? am getting the time delay on just putting a select statement of 5 records...

              V 1 Reply Last reply
              0
              • H Hema Bairavan

                Dear Eddy, First of all thanks for your time to replying to me.. Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue. And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more. So getting into webservices will solve my problem? but how about images through web services?

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Hema Bairavan wrote:

                Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue.

                So.. I could simply try "sa" and password-combinations over the internet? Can I has the IP? :-D

                Hema Bairavan wrote:

                And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more.

                "A bit faster" isn't very encouraging; it means that the image's size probably isn't the bottleneck. Your LAN is a few MB wide, at least - one usually does not have that bandwidth on the internet.

                Hema Bairavan wrote:

                So getting into webservices will solve my problem? but how about images through web services?

                Webservices would not make it go faster, on the contrary, it's an extra layer. OTOH, it'd be a bit safer. You're describing a desktop-application. How long does it take to download a megabyte, using your code? I assume you download the images only once, and cache them locally? Otherwise, consider hosting them on a webserver (not a database) and use the WebBrowser control to display them; that way IE will determine whether or not it needs to download a new version, or use the cached one in a temp-folder.

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]

                1 Reply Last reply
                0
                • H Hema Bairavan

                  Dear V, First of all thanks for your time to replying to me. I have restricted the application to store the image size only less than 50kb, and even there also am getting problem. And i hope i could go for the option you said saving in the disk but once again as an windows application accessing image from a shared drive??? and regarding the security none other than me or my application is going to log in to the application none other foreigners. And i have only 5 records in my table.. Is there indexing will apply in this case? am getting the time delay on just putting a select statement of 5 records...

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

                  Hema Bairavan wrote:

                  size only less than 50kb

                  That´s not much, so no problem there

                  Hema Bairavan wrote:

                  but once again as an windows application accessing image from a shared drive???

                  Why should this be a problem?

                  Hema Bairavan wrote:

                  Is there indexing will apply in this case?

                  No , five records doens´t need indexing. In this case you have to culprits left, your code or the network, debug your application and check what method or statement takes a long time.

                  V.
                  (MQOTD Rules and previous Solutions )

                  1 Reply Last reply
                  0
                  • H Hema Bairavan

                    Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    You must localize the problem. However per your other comment it is probably a network problem. Your other comment suggest that a query without the image data is a "bit" faster. A query without the image data would be smaller than one with it. And a network problem would have more problems with more data. Thus that fits. A database problem with the size that you suggested in another comment seems very unlikely unless you did something very odd with the database. And I can't image how you could have messed up the client side that would cause a slow down. There are various ways to test network performance which you can google for.

                    1 Reply Last reply
                    0
                    • H Hema Bairavan

                      Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan

                      H Offline
                      H Offline
                      Hema Bairavan
                      wrote on last edited by
                      #10

                      Ok Guys, Thanks for all your help and suggestions and your time for replying. With your suggestions and replies now am planning to change my application to take the image from shared disk using web browser control in my application and database connection would be using web services. So is this ok? Thanks again for all your help.

                      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