0

I migrated to a new PC, moving from 32 bit Windows 7 to 64 bit, and from VS2010 to VS2012. A MVC project I'm working on that worked fine on the old system now refuses to connect to Oracle from the new system. When I debug the project I get the following error:

ORA-01019: unable to allocate memory in the user side

I can't seem to find anything online regarding this (rather useless) error that is not either specific to Oracle software or Excel/Access-related.

The relevant code is:

private string _connectionString = "Provider=msdaora;Data Source=***;User Id=***;Password=***;";
private OleDbConnection _connection;

public DB()
{
    _connection = new OleDbConnection(_connectionString);
    _connection.Open();     // throws error here
}

The function is a constructor in a class that wraps the Oracle DB so callers only deal with OleDB objects.

I have SQL Developer running and it connects to the same Oracle DB just fine. It uses the JDBC connection but I tested it with the TNS connection and it also worked fine, and there is only one Oracle Home directory, so presumably the tnsnames.ora file is in the correct location. (I'm not an Oracle expert by any stretch)

Clearly there is something wrong with my configuration, but I don't know what, since SQL Developer connects fine. It appears specific to VS, but I don't know if the issue is specifically VS2012 related, or 64-bit related, or ... ?

Any help appreciated, thanks.

Dave
  • 1,057
  • 2
  • 12
  • 18

1 Answers1

1

Since visual studio is 32 bit application, you need to install 32bit drivers for oracle. See my related question about visual studio, oracle drivers and 32-64 bit issue.

Try to connect to oracle using Server Explorer add new Data Connection. If your oracle connection works here, your application should be able to connect too.

Community
  • 1
  • 1
Atilla Ozgur
  • 14,339
  • 3
  • 49
  • 69