Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create Oracle store procedure via Visual Studio .Net 2003

Status
Not open for further replies.

123ASP

MIS
Nov 2, 2002
239
US
hi,
I am not an oracle developer and never used it before. I only know MS Sql server 2000. I want to be able to create a storeprocedure in Oracle database for reporting purposes. I have visual studio .net 2003. My question, can I create storeprocedure in Oracle database via visual Studio .net?
if not , what is the best way to learn how to create store procedures that accept input parameters.
thanks for your help
Al
 
You can certainly create stored procedures in Oracle.

I am not sure if you can use Visual Studio to do that, as I never had to deal with it.

Use can use Oracle's proprietary programming language, PL/SQL to create those procedures. Now days, you can also store Java procedures in Oracle database, although I am not sure from what version Oracle has been supporting this feature.

If you want to know more about Oracle stored procedures and programming interfaces go to otn.oracle.com for more information.


Anand
 
You question is having two different levels. First how write simple stored procedure and next how get result set back for report

In oracle you need to write stored procedure on notepad and execute it at PL/Sql prompt. I have given here an example executed this SQL prompt.
Create or replace procedure P1(dt in out Date)
as
Begin
Select sysdate into dt from dual;
End;


To use stored procedure in your reports you need to get result set back. In SQL server the select statement will return result set. In oracle it is not simple you need to use a different type cursor called ref cursor.

You need to read a PL/SQL book little bit to understand these concepts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top