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. Problem in connecting with SQL database on client machine

Problem in connecting with SQL database on client machine

Scheduled Pinned Locked Moved C#
helpdatabasecsharpcsssysadmin
4 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.
  • A Offline
    A Offline
    Affan Toor
    wrote on last edited by
    #1

    hi, I was not sure whether to post this message in database forum or C#, plz guide. I have developed a simple database application which reads records from table and displays them in grid, it runs fine on my system but when I try to run it on client's machine it either gives exception or just crashes. It seems that there is some issue in connection string but I have not been able to identify.. here's some information: Connection String: Data Source=.\SQLEXPRESS;AttachDbFilename=D:\dev\POS\POS\bin\Release\POS_DB.mdf;Integrated Security=True;User Instance=True;Connect Timeout=200 Exception: "The timeout period elapsed prior to completion of the operation or the server is not responding." I have tried many things but nothing worked, any kind of help will be appreciated. Thanks, Regards, Affan Ahmad Toor

    .................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!

    H 1 Reply Last reply
    0
    • A Affan Toor

      hi, I was not sure whether to post this message in database forum or C#, plz guide. I have developed a simple database application which reads records from table and displays them in grid, it runs fine on my system but when I try to run it on client's machine it either gives exception or just crashes. It seems that there is some issue in connection string but I have not been able to identify.. here's some information: Connection String: Data Source=.\SQLEXPRESS;AttachDbFilename=D:\dev\POS\POS\bin\Release\POS_DB.mdf;Integrated Security=True;User Instance=True;Connect Timeout=200 Exception: "The timeout period elapsed prior to completion of the operation or the server is not responding." I have tried many things but nothing worked, any kind of help will be appreciated. Thanks, Regards, Affan Ahmad Toor

      .................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      Things that occur to me. I'm sure that you will have checked them anyway, but it does no harm to have a reminder. 1) is the SqlExpress on the clients machine running? 2) was it installed with the same settings as the one on your machine? 3) unlikely, but is the path correct? (you should get a different error, if so, but worth checking) If I think of any others I'll post again.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      A 1 Reply Last reply
      0
      • H Henry Minute

        Things that occur to me. I'm sure that you will have checked them anyway, but it does no harm to have a reminder. 1) is the SqlExpress on the clients machine running? 2) was it installed with the same settings as the one on your machine? 3) unlikely, but is the path correct? (you should get a different error, if so, but worth checking) If I think of any others I'll post again.

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

        A Offline
        A Offline
        Affan Toor
        wrote on last edited by
        #3

        hi Henry, thanks for reply. i dint knew that SQL Express should be installed on client machine. I havnt installed it on client machine, i will try it. Can you please elaborate how can I install SQL Express having same setting? Thanks, Regards, Affan Ahmad Toor

        .................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!

        H 1 Reply Last reply
        0
        • A Affan Toor

          hi Henry, thanks for reply. i dint knew that SQL Express should be installed on client machine. I havnt installed it on client machine, i will try it. Can you please elaborate how can I install SQL Express having same setting? Thanks, Regards, Affan Ahmad Toor

          .................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          For the application to run on the clients machine, it must have access to an Sql Server instance. If one is already there, either on the machine or on the network, then simply change the '.\SQLEXPRESS' part of your connection string to the name of that Sql Server. If not, then install SqlExpress. The biggest problem you will have is to remember the settings you used on your own machine. :) Unless you can remember exactly how you did it, just go for the defaults and try it. Don't forget to copy the *.mdf and *.ldf files, unless your application creates them or the installer does it for you. Good luck! :)

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          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