on 01-16-2018 6:48 PM
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
Microsoft's Oracle driver only supports Oracle 7. Install Oracle's OLE DB provider and updater the reports using that driver.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mr. Williams,
I did not have any luck there as well.
Any other suggestions?
Thank you,
T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mr. Williams,
Thank you for your reply. I use ODP.Net. I will give the OLEDB a try and report back.
Thank you,
T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.