![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a DTS package that contains an activeX script and a "Microsoft OLE DB Provider for SQL Server" connection. I have defined the server and database to use in the connection. How can I from my activeX script get a list of tables, table indexes by somehow referencing the connection I defined: DTSGlobalVariables.Parent.Connections("MyConnectio n") Is it possible to get these properties from the object above? I am currently using SQLDMO to create an object CreateObject("SQLDMO.SQLServer") opening the connection, getting the table list etc. and closing the connection. If I already have a connection defined ("MyConnection"), why do I have to use SQLDMO to open an extra connection that accesses properties of the database? Shouldn't I able able to use the object DTSGlobalVariables.Parent.Connections("MyConnectio n") to get these same properties? Thanking you, -tom |
#3
| |||
| |||
|
|
For what do you require the list of tables? I need to get the .Script property of the table object (used to create |
|
There is nothing in the connection itself for you to use. When you use the connection in a datapump then DTS has to go away and query the tables seperately as well (Note how long it takes on a large DB). For what do you require the list of tables? You can use the connection but you would only be mapping to ADO properties the same properties from the connection object. SQLDMO is the way forward if you want stuff like this although you can retrieve this information from the INFORMATION_SCHEMA.XXX views (or a lot of it at least) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Thomas Abraham" <thomas_rp (AT) hotmail (DOT) com> wrote in message news:5cf0e3b0.0404171611.4fd072b (AT) posting (DOT) google.com... Hi, I have a DTS package that contains an activeX script and a "Microsoft OLE DB Provider for SQL Server" connection. I have defined the server and database to use in the connection. How can I from my activeX script get a list of tables, table indexes by somehow referencing the connection I defined: DTSGlobalVariables.Parent.Connections("MyConnectio n") Is it possible to get these properties from the object above? I am currently using SQLDMO to create an object CreateObject("SQLDMO.SQLServer") opening the connection, getting the table list etc. and closing the connection. If I already have a connection defined ("MyConnection"), why do I have to use SQLDMO to open an extra connection that accesses properties of the database? Shouldn't I able able to use the object DTSGlobalVariables.Parent.Connections("MyConnectio n") to get these same properties? Thanking you, -tom |
![]() |
| Thread Tools | |
| Display Modes | |
| |