I have a connection manager that points to an oracle database.I then need to use that said connection into a ssis script task.I don't know how to proceed.I tried something and I got an error message could you help me.Here is my code: I also tried with those connection string:
// SqlConnection conn = new SqlConnection("Data Source=SOURCE;User ID=user_GG;Provider=OraOLEDB.Oracle.1;Persist Security Info=True;");
SqlConnection oracleConn = new SqlConnection("Data Source=PRONMPIA;Persist Security Info=True;Integrated Security=yes;");
oracleConn.Open();
using (SqlCommand command = new SqlCommand("SELECT count(*) FROM random.table", oracleConn))
using (SqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
int name = reader.GetInt32(0);
MessageBox.Show("SALUT " + name.ToString() );
}
}
oracleConn.Close();
MessageBox.Show(" test succes");
Dts.TaskResult = (int)ScriptResults.Success;