OCIEnvCreate failed with return code -1, but no error message text is available. at DataObjectSupport (721.6)

I recently installed the latest Oracle Data Provider for .NET (ODP.NET 11.2.0.1.2) due to the Microsoft Oracle Client being out of date. The new SqlDataSource utility has stopped working since installation. When I try to set up the datasource and check the connection, it gives me the following error message:

Failed to get the database schema for this connection. Make sure your connection settings are correct and that the database is online.

OCIEnvCreate failed with return code -1, but no error message text is available. at DataObjectSupport (721.6)

The connection settings are definitely correct and the database is online because any data binding I have done manually works fine. For example, I can manually bind a Gridview, ListBox, etc. Go to ODP.NET and display the data without any problem. But I am unable to configure and use the SqlDataSource. This is painful because both Gridview and Listview have a lot of cool built-in functionality. When you bind controls in code behind a file, you lose all functionality.

I added ASPNET for Oracle Home and gave it full access control and restarted my computer, but it doesn't work. I am using Visual Studio 2010 and am connecting to a remote Oracle database which is Oracle 10g. Does anyone know why I'm having a SqlDataSource problem?

+3


source to share


2 answers


Solved it looks like it was a network issue causing this as it started working on its own again.



0


source


I had a similar problem and decided to edit the .csproj file. In my case, I was using a project to connect to a database, and in another application, a console application, I was executing my program logic and calling this library. To solve the problem, I checked my .csproj section. In the database connection project, the Debug | Any CPU property was different compared to my .csproj console application. I replaced it like this:



<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
 <DebugSymbols>true</DebugSymbols>
 <DebugType>full</DebugType>
 <Optimize>false</Optimize>
 <OutputPath>bin\Debug\</OutputPath>
 <DefineConstants>TRACE;DEBUG</DefineConstants>
 <ErrorReport>prompt</ErrorReport>
 <WarningLevel>4</WarningLevel>
 <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

      

0


source







All Articles