HOW CAN I CALL A ORACLE FUNCTION FROM VB.NET CODE?
573407Jul 25 2007 — edited Jul 25 2007Hi 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