title: How to set up .net teradata connection in c#?
body: <p>I am trying to connect to Teradata with c#. I am using the sample code from <a href="http://developer.teradata.com/doc/connectivity/tdnetdp/13.11/webhelp/DevelopingNetDataProviderforTeradataApplications.html">this website</a> </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  using Teradata.Client.Provider;
  
  namespace Teradata.Client.Provider.HelloWorld
  {
      class HelloWorld
      {
          static void Main(string[] args)
          {
              using (TdConnection cn = new TdConnection("Data Source = x;User ID = y;Password = z;"))
              {
                  cn.Open();
                  TdCommand cmd = cn.CreateCommand();
                  cmd.CommandText = "SELECT DATE";
                  using (TdDataReader reader = cmd.ExecuteReader())
                  {
                      reader.Read();
                      DateTime date = reader.GetDate(0);
                      Console.WriteLine("Teradata Database DATE is {0}", date);
                   }
               }
           }
      }
  }
  </code></pre>
  
  <p>(I have also tried <code>DSN , UID , PWD</code> 
  However, I am getting exception that either my <strong>userid , account or password not correct</strong> ...
  But I am able to login using SQL Assistant easily. So , I rule out incorrect userid or password </p>
  
  <p><a href="http://forums.teradata.com/forum/connectivity/net-connection-string-with-ldap">Here I found a possible solution for my problem</a>
  But I do not know what exactly I need to change in my sample code.</p>
  
  <p>So, I have no idea how to implement that solution.</p>
  
  <p>Can anybody give me a working sample code?</p>