Execute ObdcCommand for NetezzaSQL with C#
<p>I am trying to execute a command with OdbcCommand in c# but it seems i can't even open the connection. This is the data I got to create the Connection String</p>

<pre><code>Server: APPRDNETEZZA (192.168.0.64)
Web Server: beamprdwb3
ODBC DSN Name (64bit): NZ_FUTUREBRANDS
User: MSTR_ADMIN
Port: 5480
</code></pre>

<p>This is my code</p>

<pre><code>string connetionString = null;
OdbcConnection cnn;
OdbcCommand cmd;
string sql = null;
connetionString = "Driver={NetezzaSQL}; servername=APPRDNETEZZA ; 
database=NZ_FUTUREBRANDS; port=5480; username=MSTR_ADMIN;  
password=mstr17Uz1%4;";
sql = "CREATE EXTERNAL TABLE X_STORE_GROUP_GUID_12345(" +
                        "STORE_ID VARCHAR(10)," +
                        "STORE_NAME VARCHAR(50)," +
                        "USERID Varchar(255)," +
                        "import_guid Varchar(255), )" +
                        "USING(" +"DATAOBJECT('/apnas01/vol2.nfs.Data/ap_prod/data/store_upload/scripts/12345_guid_12345')" + "logDir '/apps/ap_prod/log'" + "     delimiter ','" + "  "; ";
        cnn = new OdbcConnection(connetionString);
        try
        {
            cnn.Open();
            Console.WriteLine("Connection Opened ");
            cmd = new OdbcCommand(sql, cnn);
            cmd.ExecuteNonQuery();
            cmd.Dispose();
            cnn.Close();
            result = "Executed sucessfully";
        }
        catch (Exception ex)
        {
            result = "Error" + ex.InnerException.ToString();
        }
</code></pre>

<p>The error happens when it tries to open the connection. While debugging it gave me this inner exception</p>

<blockquote>
  <p>[ODBC Driver Manager] Data source name not found and no default driver
  specified</p>
</blockquote>

<p>I have the Odbc driver installed in my machine. I dont know it this is happening cuz the connection string is in bad format. I have spent many hours trying to figure it out why doesnt work. Appreciate any kind of help. Thanks</p>