Skip to Main Content

SQL & PL/SQL

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!

HOW CAN I CALL A ORACLE FUNCTION FROM VB.NET CODE?

573407Jul 25 2007 — edited Jul 25 2007
Hi friends . i hav started working in Oracle now . i want to change some front end functions to backend. so i am planning to write some oracle functions . i know how to call a procedure from from vb.code. can i call the oracle function like calling a procedure . Can i substitute the function name instead of procedure name in the code given below.



If CNC.State = ConnectionState.Closed Then CNC.Open()
cmd1 = New SqlClient.SqlCommand("STORED PROCEDURE NAME", CNC)
cmd1.Parameters.Add("PARAMETER1",SqlDbType.VarChar, 10).Value = strFromDate
cmd1.Parameters.Add("PARAMETER2",SqlDbType.VarChar, 10).Value = strToDate
cmd1.Parameters.Add("PARAMETER3", SqlDbType.VarChar, 10).Value = strUser_Id
cmd1.CommandType = CommandType.StoredProcedure
cmd1.CommandTimeout = 0
adpt1.SelectCommand = cmd1

adpt1.Fill(dttb)




other doubt is , can i write a oracle function without any return parameter .
I am very grateful , if somebody explains me the difference between a Function and a Procedure in Oracle

if anybody knows . please help me .



thanks & regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2007
Added on Jul 25 2007
3 comments
1,141 views