1 Reply Latest reply on Jul 10, 2013 4:09 PM by Ramesh Reddy

    Connecting to Teiid VDB using ODBC

    teiiduser Newbie



      I am trying to connect to a VDB using C sharp.

      I followed http://docs.jboss.org/teiid/7.1.0.Final/client-developers-guide/en-US/html/ODBC.html


      and created a DSN. The connection test is successful. But when I try to connect programmatically, it throws an exception:


      ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application


      This is my code:


      public void ConnectToData()

                 OdbcConnection Conn = new System.Data.Odbc.OdbcConnection("DSN=TeiidNetUser;UID=myuserid;PWD=mypwd");
               OdbcCommand catCMD = new OdbcCommand("SELECT * FROM table1", Conn);








                 OdbcDataReader myReader = catCMD.ExecuteReader();

                  while (myReader.Read())
                      var table = myReader.GetSchemaTable();
                      foreach (DataColumn column in table.Columns)



      Any help is appreciated. Thank you!