Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Managed ODAC.NET

2733539Aug 15 2014 — edited Aug 16 2014

I tried to get the oracle ODBC driver working with my application and had major issues with the x64 driver and after working with the 32 bit driver I discovered more the same.  So I am looking into writing a native link in my C# .net application.

My application is compiling in "Any CPU" and I do not want to change that because of other bigger issues I'll have.

My understanding with the issues on the x64 code was that numbers were being returned with a much bigger precision than what can be handled.  Will I still have these issues using the x64 ODAC.NET?

I downloaded the 32bit ODAC.net for visual studio but when I add the reference to the library I get a processor mismatch error.  I found a post on here referring to using the managed odac.net but no link was provided so I did a search and found this:

http://www.oracle.com/technetwork/topics/dotnet/index-085163.html

But when I click on download the latest odp.net I get a list of the same downloads I saw before:

http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html

What is the path I need to pursue to link your dll into my app and will I still have issues with x64 as I did with the ODBC driver?

Honestly, with all the libraries I use this one seems to be the worst for compatibility and confusion.  As a developer I shouldn't have to worry about making "work-arounds" for your library to use it.  I should just be able to link and code...

Thanks for your help!

Comments

Saubhik

This thread may help you.

PhilMan2

Hi,

I looked at this thread and its links.  It doesn't help, unfortunately.  I'm still looking for an answer of how to send an embedded image in the body of an html eMail using UTL_SMTP.

Has anyone had any experience with this?

Phil

Stako Botev

Hi,

Have you considered that this could be due to your e-mail client?

I just tried your sample message body with the embedded image in it - I sent it through Oracle UTL_SMTP and received it successfully on my local e-mail client.

The image was fine and displayed as normal picture. However when I sent the same email on my gmail account, the picture was not shown.

So this is most probably due to configuration of the mail client.

Cheerz,

Stako

PhilMan2

Hi 2772777.  Thanks for looking at this.  I really appreciate it.

I get similar results when I switch to my hotmail account.  I retrieve the eMail using Outlook 2013 as well as through a FIrefox browser to outlook.com.  All attempts do NOT show the image.  I'm wondering if it's the way I'm calling UTL_SMTP.

The code that actually sends html body of the eMail is:

----------------------------------------------------
-- Send the email body in 1900 byte chunks to UTL_SMTP
l_offset  := 1;
l_ammount := 1900;
utl_smtp.open_data(l_connection);

while l_offset < dbms_lob.getlength(l_body_html) loop
    utl_smtp.write_data(l_connection,
                        dbms_lob.substr(l_body_html,l_ammount,l_offset));
    l_offset  := l_offset + l_ammount ;
    l_ammount := least(1900,dbms_lob.getlength(l_body_html) - l_ammount);
end loop;
--The following crlf is necessary after the body is written
utl_smtp.write_data(l_connection, crlf);
----------------------------------------------------

Any ideas?  Again, thanks for your help.

Phil

Billy Verreynne

If you create a valid MIME body as per RFC specifications, it will render correctly in the vast majority (if not all), of e-mail clients.

PhilMan2

Hi Billy.  Thanks for replying.  I looked at the link you provided.  I'm trying to figure out where the body I'm sending is not a valid MIME body.  Is there some sort of validation site that can tell me what's improper about my current message?

Thanks for your help.

Phil

Billy Verreynne

No. Not that I'm aware of.

When creating e-mail bodies, I prefer to letting an e-mail client do it for me. I will use my e-mail client, create the type of e-mail I want, and then mail it to myself. I'll then view the incoming e-mail in its raw format and use that as a template for my code.

Just keep in mind that not all mail clients and mail servers are equal. MS Exchange for example for some idiotic reason rips the raw e-mail apart and rewrites the entire thing - to the extent of replacing your boundary tags with its boundary tags, and base64 encoding plain/text MIME areas. So do not expect your e-mail to arrive in the actual format that you send it. Which is why it is best to ensure your e-mail is as vanilla MIME as possible. 

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 13 2014
Added on Aug 15 2014
5 comments
1,629 views