I have added reference to Teradata.Client.Provider (.NET Data Provider for Teradata 184.108.40.206, Runtime v2.0.50727) to my Visual Studio C# 2010 project
Now, i want to get list of all ODBC names for Teradata
I included the namespace for Teradata.Client.Provider
I want to see the list of all Teradata datasources defined in ODBC.
I have 3 ODBC DSN defined for Teradata. However the factor doesn't return any. Why?
string ProviderName = "Teradata.Client.Provider";
DbProviderFactory factory = DbProviderFactories.GetFactory(ProviderName);
DataTable dt = new DataTable();
DbDataSourceEnumerator dsenum = factory.CreateDataSourceEnumerator();
dt = dsenum.GetDataSources();
Why isn't able to create DataSource Enumerator?
The .NET Data Provider for Teradata has nothing to do with ODBC or the ODBC Driver for Teradata.
You must use the Microsoft .NET Data Provider for ODBC if you want to use the ODBC Driver to connect to the Teradata Database. But note that the Microsoft .NET Data Provider for ODBC does not enumerate the ODBC Data Sources (User or System).