locked
DataBase Connection String for SQL Server authentication RRS feed

  • Question

  •  

    To connect to database dynamically, i wrote expression in connectionString Property as,

     

    "Data Source="+ @[User :: SourceServer] +";User ID=sa;Initial Catalog= "+ @[ User :: SourceDatabase] +";Provider=SQLNCLI.1;Persist Security Info=True;Auto Translate=False;"

     

    where SourceServer and SourceDatabase are variables for Server and Database. And 'sa' is the username which i gave it directly.

     

    When i evaluate the expression everything is fine. but while running the package its shows error because the connection string doesn't include password.

     

    How to give Password in the connectionString?  [When i use windows authentication its working fine]

    Please help me.

     

    Wednesday, October 15, 2008 10:02 AM

Answers

  • In the connection string expression exemple you dont set Password property. Why?

    Try to add to your expression : + "Password=<your sa password>"
    Wednesday, October 15, 2008 12:47 PM
    Answerer

All replies

  • In the connection string expression exemple you dont set Password property. Why?

    Try to add to your expression : + "Password=<your sa password>"
    Wednesday, October 15, 2008 12:47 PM
    Answerer
  • Thanks a lot.....

    Its working fine.....

     

    Friday, October 24, 2008 11:32 AM
  • Thanks to mark the post as a answer to your question for close the subject. 

    Friday, October 24, 2008 12:54 PM
    Answerer