Qiuwei


Hi, there;
I try to import data from ODBC using C# programmatically. Is there any sample code we can have a look. Like how to read schema from ODBC source table and then create source column...

Thanks




Re: Sample code to importing data from ODBC

Jamie Thomson


Qiuwei wrote:
Hi, there;
I try to import data from ODBC using C# programmatically. Is there any sample code we can have a look. Like how to read schema from ODBC source table and then create source column...

Thanks

Sounds like you're in the wrong forum. If you are writing a dotnet app then try the dotnet forums.

If you are using SSIS then I'm not really understanding why you're writing C# code. Are you trying to build a SSIS package programatically using the SSIS API

-Jamie







Re: Sample code to importing data from ODBC

Qiuwei

Yes, I am.

The number of tables in ODBC source will change at any time. So I'd like to build SSIS package programatically using SSIS API. So what I want to do is to check to see if a table in ODBC source existing in SQL2005 first, if not, create a table first with same table name, schema... and then pump data.

Thank you.







Re: Sample code to importing data from ODBC

Jamie Thomson

Qiuwei wrote:

Yes, I am.

The number of tables in ODBC source will change at any time. So I'd like to build SSIS package programatically using SSIS API. So what I want to do is to check to see if a table in ODBC source existing in SQL2005 first, if not, create a table first with same table name, schema... and then pump data.

Thank you.

Right, well this isn't a C# problem. Take C# out of the equation. How would you otherwise check to see if a table existed in your source

Note that this depends on what sourt of source system you are accessing and seeing as you haven't provided that information, I can't help you.

-Jamie