Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

C# code to connect Netezza using OLEDB provider

$
0
0

Hi All,

I want to connect netezza using c# need help I managed to write this but didn't worked

OleDbConnection con = new OleDbConnection("Provider=NZOLEDB;Password=password;User ID=x;Data Source=x;Initial Catalog=OCEAN_FX;
Persist Security Info=True;Port=5480;Logging Level=0 or 1;Log Path=Path to log;Optimize for ASCII=True / False;");
            OleDbCommand cmd = new OleDbCommand();
            OleDbDataReader dreader ;
            cmd.Connection = con;
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "select ACTION from x ";
            con.Open();
            con.Close();
            dreader = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(dreader);
            OleDbDataReader reader1 = cmd.ExecuteReader();
            while (reader1.Read())
            {
                string a;
                a = reader1["ACTION"].ToString();
                MessageBox.Show(a);
            }



Sri.Tummala


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>