dbTalk Databases Forums  

Trusted Connection

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Trusted Connection in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eduardo Greco
 
Posts: n/a

Default Trusted Connection - 08-01-2004 , 07:22 AM






Hi there...
I'm using an ActiveX Script Task and I'm trying to connect a local server
with trusted connection, i.e., not a Database User but the Windows user.
How to do it?

Set ADOcon = CreateObject("ADODB.Connection")

ADOcon.Provider = "sqloledb"
ADOcon.Properties("Data Source").Value = "LOCAL SERVER"
ADOcon.Properties("Initial Catalog").Value = "DatabaseName"
'*****ADOcon.Properties("User ID").Value = "Eduardo"
'*****ADOcon.Properties("Password").Value = "a"
ADOcon.Open

Thank you for the help...
Eduardo



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Trusted Connection - 08-01-2004 , 11:54 AM






Your sample would be

ADOcon.ConnectionString = "Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=MyDatabase;Integrated Security=SSPI"



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Eduardo Greco" <eduardo (AT) persocom (DOT) com.br> wrote

Quote:
Hi there...
I'm using an ActiveX Script Task and I'm trying to connect a local server
with trusted connection, i.e., not a Database User but the Windows user.
How to do it?

Set ADOcon = CreateObject("ADODB.Connection")

ADOcon.Provider = "sqloledb"
ADOcon.Properties("Data Source").Value = "LOCAL SERVER"
ADOcon.Properties("Initial Catalog").Value = "DatabaseName"
'*****ADOcon.Properties("User ID").Value = "Eduardo"
'*****ADOcon.Properties("Password").Value = "a"
ADOcon.Open

Thank you for the help...
Eduardo





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.