Skip to Content
0

C#, VS2015, Oracle

Jan 16 at 06:48 PM

68

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Don Williams
Jan 16 at 06:49 PM
0

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

Don

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 17 at 09:59 PM
0

Mr. Williams,

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

Thank you,
T

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 18 at 04:52 PM
0

Mr. Williams,

I did not have any luck there as well.

Any other suggestions?

Thank you,
T

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

Don

0