How to get connectionstring to connect to SQL Express 2005 on the client PCs?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    How to get connectionstring to connect to SQL Express 2005 on the client PCs?

    Hi.
    I have a application that i want to deploy to multiple pcs.
    Included sql express 2005 to the prerequisites and is installed first time.

    My pc has Sql Server 2005 and manager. The solution works 100% on my pc.
    The connectionstrin g is the problem with the client pc.
    I need the connectionstrin g to connect to sql express 2005 on the pc's that the solution will be installed on.

    At the moment im using
    Code:
    Server =(local);Data Source=.\SQLEXPRESS;DataBase=;Integrated Security=SSPI;Trusted_Connection=True
    This gives me error.

    I have done this before but ive lost the project some time back.

    Could anyone please help me.
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    #2
    Problem is with access rights to create the database.

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      Are you saying your application is creating a database?

      ~~ CK

      Comment

      • OuTCasT
        Contributor
        • Jan 2008
        • 374

        #4
        What happens is, when they first use the application they create a company/database. I did some debugging and found that the application was being installed under program files, and then when i tried to create the database in the application folder it gave a access denied error.
        So either set security on the program folder or install application directly into C:\Program Name.

        Comment

        • ck9663
          Recognized Expert Specialist
          • Jun 2007
          • 2878

          #5
          There are a lot of factors to consider. Remember that even though it's a database that's being created, it's still a file as far as the Windows OS is concerned. Where this file (data and log) will be created needs to be accessible (with the proper user rights) to the one creating it. That would depend on who's user the OS is getting from your app.

          Good Luck!!!

          ~~ CK

          Comment

          Working...