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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

System.NullReferenceException' occurred in Oracle.DataAccess.dll

797055Sep 15 2010 — edited Jun 17 2013
Hello everyone !!

I know that the same problem has been posted previously by other users. I've tried every solution that is suggested but it still don't solve my problem. Here is the detail :

Environment : Window 7 Home Premium 64 bit
Database : Oracle 10g Express Edition
ODAC version : Oracle 10g Release 2 ODAC
Microsoft Visual Basic 2005 Express Edition

I've been trying codes and every time I execute it, the same error will appear :'An unhandled exception of type 'System.NullReferenceException' occurred in oracle.dataaccess.dll
Additional information: Object reference not set to an instance of an object.'

Reading the previous post, so I tried to run both Oracle & Visual Basic 2005 as administator, checked the status of service, tnsping the database aliases in tnsnames.ora , log on through sqlplus with the user provided in connection string :: all these are succcesful. Still, when I tried to run my application in Visual Basic, the same error appear.

The codes that I've been using:


Imports Oracle.DataAccess.Client
Imports Oracle.DataAccess.Types 'declaration in General class

Dim conn As New OracleConnection("user id=userID;password=mypassword;data source=My-PC:1521/XE")
conn.Open()



I've also defined a database alias in tnsnames.ora file :

OraDb=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=My-PC)(PORT=1521))
)
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=XE)
)
)


Is it because of I'm using a 64-bit Windows platform?? Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2013
Added on Sep 15 2010
12 comments
19,008 views