cancel
Showing results for 
Search instead for 
Did you mean: 

C#, VS2015, Oracle

Former Member
0 Kudos

Good morning,

I am trying to create a service using C#, VS2015, Oracle 12c, and CR for VS. The service will run in a scheduler that produces the reports and email to the appropriate staff. I have done this previously but with SQL Server. I am new to the Oracle world.

The report(s) are saved on a shared network folder.

The report was designed in VS. I am using the database dll: crdb_ado and the provider is MSDAORA. I can view the report within VS with data. The report is NOT part of the project.

I can load the rpt file but for some reason, it always comes up saying database logon failed in code.

Has anyone successfully connected using Oracle? I have searched and most examples use SQL Server.

The last thing I tried was:

foreach(Table crTable in reportDocument.Database.Tables)
{
TableLogOnInfo loi = crTable.LogOnInfo;
loi.ConnectionInfo.ServerName = "myserver.mydomain.com";
loi.ConnectionInfo.DatabaseName = "mydatabase.mydomain.com";
loi.ConnectionInfo.UserID = "user";
loi.ConnectionInfo.Password = "password";
crTable.ApplyLogOnInfo(loi);
//reportDocument.Database.Tables[i].Location = "user" + "." + reportDocument.Database.Tables[i].Name;
}

//attach the report to the email.
mm.Attachments.Add(new Attachment(reportDocument.ExportToStream(report.ExportFormat), report.ReportName));

The exportformat is pdf.

Any help would be immensely appreciated!

Thank you,
T

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Microsoft's Oracle driver only supports Oracle 7. Install Oracle's OLE DB provider and updater the reports using that driver.

Don

Answers (2)

Answers (2)

Former Member
0 Kudos

Mr. Williams,

I did not have any luck there as well.

Any other suggestions?

Thank you,
T

0 Kudos

Try using ODBC, OLE DB has problems at various versions of Oracles Clients.

Don

Former Member
0 Kudos

Mr. Williams,

Thank you for your reply. I use ODP.Net. I will give the OLEDB a try and report back.

Thank you,
T