all groups > sql server dts > february 2005 >
You're in the

sql server dts

group:

Dynamic properties to get table structure


Dynamic properties to get table structure Subbaiahd
2/10/2005 5:09:38 PM
sql server dts:
Allan,

I wanted to get definition of a table dynamically from source whenevr it
runs, source is a file system , it has odbc driver to support the file
system. when i run manually thru wizards it is creating table and loading
data. when i save the package, create table script is saving as sql script
and i am not able to make it dynamic, is there a way for it

i know how to set up dynamic properties for all other properties, this
requirement needs to grab definition of the table from source (and source is
not a sql server) for that i dont have a clue at all how to approach to the
issue. I am ready to code whatever it takes if there is an option available.
Thanks for your time



Regards,

Subbu.

Re: Dynamic properties to get table structure Allan Mitchell
2/10/2005 10:32:06 PM
This would have to be done through the driver I believe. .Net allows
you to do this through the GetSchemaTable method on the IDataReader
object although I am not suggesting you do this.

Unfortunately I do not know how to query ANY datasource in this way
although I wuld be interested in knowing.


[quoted text, click to view]
Re: Dynamic properties to get table structure Paul Smith
2/11/2005 7:32:41 AM
I do something similar in a generic extract procedure I have.
Given that my SQL is something like SELECT * FROM MyTable, I create a
modified version something like SELECT * FROM MyTable WHERE 0 = 1 and
execute this within a SQL Task storing the results in a global variable, the
recordset in the variable then contains no rows but does contain colums and
datatypes etc.

Paul


[quoted text, click to view]

Re: Dynamic properties to get table structure Subbaiahd
2/11/2005 10:47:09 AM
Allan,

Thanks for the response, I guess i have only one option to achieve this
which is like you said "GetSchemaTable method on the IDataReader object".

Thanks,
Subbu.

[quoted text, click to view]

AddThis Social Bookmark Button