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 |
|
elomon
Starting Member
37 Posts |
Posted - 2003-05-12 : 13:53:48
|
| Running SQL 2K - have a package with a connection defined. I will need to use this connection in several ActiveX tasks. I've seen how to create a new connection from w/in ActiveX (createobject("adodb.connection") but I want to re-use the same connection.Basically, my package has MyConn defined as a Connection. inside the ActiveX script, I want to:set rs=MyConn.execute("Select ...")but that doesn't work.Any ideas? |
|
|
Tim
Starting Member
392 Posts |
Posted - 2003-05-13 : 20:46:45
|
| You are confusing the DTS connection with the ADO connection.From ActiveX script you can write code to open an ADO connection and run some sql against it, but you will need to include a connection string for this. (you could get the connection string from the MyConn DTS connection)Another alternative to put the sql command into a separate ExecSQL task that uses the MyConn DTS connection. If you need to change that connection's properties at run time, then you can use activex tasks to do this, based on a global variable passed to the package perhaps. |
 |
|
|
|
|
|