Skip to Content
avatar image
Former Member

C#, VS2015, Oracle

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 16 at 06:49 PM

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

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 17 at 09:59 PM

    Mr. Williams,

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

    Thank you,
    T

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 18 at 04:52 PM

    Mr. Williams,

    I did not have any luck there as well.

    Any other suggestions?

    Thank you,
    T

    Add comment
    10|10000 characters needed characters exceeded