Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Rafferty Uy
Starting Member
23 Posts |
Posted - 2004-11-25 : 22:42:19
|
| Hello there!I want to use an ActiveX Script Task object to dynamically set the username/password of the Server object which uses SQL authentication. How is this done? :)I'm sorry for the very trivial/basic question. It's just that I don't know where to look these things up. Please advice :)Thanks!Rafferty |
|
|
nreinholdt
Starting Member
8 Posts |
Posted - 2004-11-27 : 22:19:49
|
| I'd write something like this, bearing in mind that your SQL Server connection probably has the default name of "Microsoft OLE DB Provider for SQL Server".dim oPkgSet oPkg = DTSGlobalVariables.Parent ' easiest way to return a reference to the package objectoPkg.Connections("Microsoft OLE DB Provider for SQL Server").UserID = "BillGates"oPkg.Connections("Microsoft OLE DB Provider for SQL Server").Password = "windowsupdate"Good luck,Nielsnragamuffin |
 |
|
|
Rafferty Uy
Starting Member
23 Posts |
Posted - 2004-12-09 : 20:23:06
|
| I tried to do this but the "Use SQL Authentication" radio button in my Microsoft OLE DB Provider for SQL Server object wasn't selected when I executed the ActiveX Script Task, how do I do this?-Rafferty |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-12-10 : 01:42:52
|
if server is mixed mode then it's ok, if it's only windows authentication, then you need to change the authentication mode. edit: you can use sp_password to change the password.--------------------keeping it simple... |
 |
|
|
|
|
|