How to connect a rdlc report to Oracle database table using Web.config connection string in Visual Studio 2012 c# asp.net.
The database connection is NOT THROUGH Server Explorer Data Connection [gives Error ORA-12154 OR ORA-6413 OR ERROR[IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.].
try
{
conn.Open();
OracleCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Employee ORDER BY ID ASC";
cmd.Connection = conn;
OracleDataReader rs = cmd.ExecuteReader();
if (rs.Read()) // C#
{
ReportViewer1.Enabled = true;
ReportViewer1.DataBind();
}
}
finally
{
conn.Close();
conn.Dispose();
}
{
conn.Open();
OracleCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Employee ORDER BY ID ASC";
cmd.Connection = conn;
OracleDataReader rs = cmd.ExecuteReader();
if (rs.Read()) // C#
{
ReportViewer1.Enabled = true;
ReportViewer1.DataBind();
}
}
finally
{
conn.Close();
conn.Dispose();
}
Thanks in advance.
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeesh MenothPosted Jun 29, 2015, 7:18 AM