dbTalk Databases Forums  

Dynamic properties to get table structure

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


Discuss Dynamic properties to get table structure in the microsoft.public.sqlserver.dts forum.



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

Default Dynamic properties to get table structure - 02-10-2005 , 04:09 PM






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.



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

Default Re: Dynamic properties to get table structure - 02-10-2005 , 04:32 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.


"Subbaiahd" <subbaiahd (AT) hotmail (DOT) com> wrote

Quote:
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.


Reply With Quote
  #3  
Old   
Paul Smith
 
Posts: n/a

Default Re: Dynamic properties to get table structure - 02-11-2005 , 01:32 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


"Subbaiahd" <subbaiahd (AT) hotmail (DOT) com> wrote

Quote:
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.





Reply With Quote
  #4  
Old   
Subbaiahd
 
Posts: n/a

Default Re: Dynamic properties to get table structure - 02-11-2005 , 09:47 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.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
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.


"Subbaiahd" <subbaiahd (AT) hotmail (DOT) com> wrote in message
news:subbaiahd (AT) hotmail (DOT) com:
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.




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.