December 5, 2002 at 4:58 pm
I believe if you are talking about dynamicSQL method it will be based on either the users login account (which would have to be a windows account) or the servers account the service is running under. I haven't tried this myself but I believe seeing a post about soemthing similar here on this site.
December 6, 2002 at 4:04 pm
What I mean is when calling OPENDATASOURCE you have to specify a user id and password. What if the server you are trying to connect to has all logins based on windows authentication. what do you put in for a password and user id. I tried this using my window credentials but it did not work.
December 7, 2002 at 4:50 pm
If connecting to a SQL Server to force it to use the logged in users security credentials instead thru Windows Authentication.
First the users must be logging into the local server via Windows Authentication.
Next their creditials must match on the remote server (I beleive username and password only).
Then you just do not use a username or password in your connection string. But you add the folowing piece to the other part of your connection string.
If using PROVIDER=SQLOLEDB add
Integrated Security=SSPI
If using MSDASQL add
Trusted_Connection=yes
I have not tried it but that is what you would use in applications and should apply here, especially in NON-DYNAMICSQL (Not built in a string to be executed).
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply