none
Cannot create DataSource Enumerator for Teradata RRS feed

  • Question

  • I could get list of all Oracle TNSnames using DbProviderFactory for "Oracle.DataAccess.Client"
    I tried the same for Teradata (to get ODBC DSN list for Teradata) and it's not working

    I added reference to Teradata.Client.Provider (.NET Data Provider for Teradata 14.0.0.0, 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 factory doesn't return any. Why?

    DataTable dt = new DataTable();
    string ProviderName = "Teradata.Client.Provider";
    DbProviderFactory factory = DbProviderFactories.GetFactory(ProviderName);
    
    if (factory.CanCreateDataSourceEnumerator)
    {
        Console.WriteLine("found");
        DbDataSourceEnumerator dsenum = factory.CreateDataSourceEnumerator();
        dt = dsenum.GetDataSources();
    }
    else
    {
        Console.Write("Data source enumeration is not supported by provider");
        Console.ReadLine();
    }

    Is there an easy alternative way to get list of all DSN ODBC names for a particular provider?

    Thanks,
    -srinivas yelamanchili


    sri

    Sunday, June 24, 2012 10:13 PM

Answers

  • Hi sri,

    This code works fine with SQL Provider and it could return the correct server name and instance name. Consider into Teradata.Client.Provider is a third party provider then we couldn’t reproduce this issue, I would like to suggest you asking help from teradata’s forum:

    Hope this could help you.

    Best Regards,

    Tony Xiao [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, June 26, 2012 2:45 AM
    Moderator