Skip to Main Content

DevOps, CI/CD and Automation

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.

Cannot run .net stored procedure

thomaso2Jul 7 2016 — edited Nov 1 2016

I'm very new to .net stored procedures.

So please excuse my perhaps stupid questions.

My environment:

Windows 8.1 Pro.

Oracle 12c 12.1.0.1.0

ODTwithODAC121024

Oracle Developer Tools for Visual Studio 2013

Microsoft Visual Studio 2013 Pro

My laptop acts as Oracle database server and Oracle client. (two separate oracle homes)

Following docs I've installed ORAC and Oracle Development tools.

I can run all client examples, my programs connect to database, executes queries.

I can create Oracle Stored Procedure project in VS 2013. I can compile my sample .NET Stored Procedure program. I can successfully deploy created DLL to Oracle database home ...bin/clr folder.

Oracle wizard creates library and wrapper pl/sql procedure or function.

But....

When I try to run test program it comes whit this error message:

ORA-20100: System.IO.FileNotFoundException

Could not load file or assembly 'Oracle.DataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

   at Project2.Class1.getDepartmentno(Int32 employee_id)

ORA-06512: at "SYS.DBMS_CLR", line 152

ORA-06512: at "<...>.GETDEPARTMENTNO", line 7

What am I messing?

How to fix this error.

TIA

Thomaso

Comments

Gary Graham-Oracle

From a worksheet, using Run Script (F5), you can do something like this if connected to the seeded HR schema:

spool C:\Temp\countries.lst

select /*csv*/ * from countries;

spool off

spool C:\Temp\departments.lst

select /*csv*/ * from departments;

spool off

spool c:\Temp\employees.lst

select /*csv*/ * from employees;

spool off

Hope this helps,

Gary

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

Post Details

Locked on Nov 29 2016
Added on Jul 7 2016
2 comments
1,161 views