CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    38

    Pass remote windows credencials in connection string

    I am trying to fetch data from msdb systable like sysjobs using windows account. The SQL server window login is differnt from mine.
    When i include the SQL server window login details in my connection string. its throwing me access denied error to sysobjects.

    "Provider=SQLOLEDB.1;Initial Catalog=msdb;User id=SQLServerwindowsloginid; Password=pwd;Data Source=ServerName;Integrated Security=SSPI"

    I can understand, that the above connection string is ignoring the userid and pwd that i have supplied as i gave Integrated Security is SSPI and its using mine.

    My windows login dont have read permission to msdb sysobjects.

    How can i use the SQL server windows login id in my connection string or how can i use windows authentication using SQLserver windows credencials?



    Thanks in advance.

  2. #2
    Join Date
    Apr 2009
    Posts
    394

    Re: Pass remote windows credencials in connection string

    See http://www.connectionstrings.com for the correct format of the correct connection string you want to use...



    Good Luck

  3. #3
    Join Date
    Apr 2008
    Posts
    38

    Re: Pass remote windows credencials in connection string

    I have tried with the examples given in the connectionstring.com. But no use at all may be i looking in a wrong direction.

    Can you please send me the connection string which suits my requirement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured