Home » Developer & Programmer » JDeveloper, Java & XML » Stored Function in oracle
Stored Function in oracle [message #92316] Mon, 31 May 2004 10:44
SPeeKer
Messages: 1
Registered: May 2004
Junior Member
 

Hello all,

I'm brand spanking new to oracle, and for whatever reason, the code I have isn't working.

If you could let me know how the call statement should appear for the stored function (or another way other than stored procedure, please let me know)

Code ...

Public myConnection As OdbcConnection = New OdbcConnection(ConfigurationSettings.AppSettings("SomethingTestConn"))

Dim AttCommand As New OdbcCommand

Dim param As New OdbcParameter

AttCommand.Connection = myConnection

AttCommand.CommandType = CommandType.StoredProcedure

AttCommand.CommandText = "{?=Call Update_Attendance(?,?,?,?,?,?,?,?)}"

AttCommand.Parameters.Add("@RetVal", OdbcType.Numeric)

AttCommand.Parameters("@RetVal").Direction = ParameterDirection.Output

AttCommand.Parameters.Add("@in_sysuser", OdbcType.VarChar, 8)

AttCommand.Parameters("@in_sysuser").Value = "BDYER"

AttCommand.Parameters.Add("@in_week_ending", OdbcType.VarChar, 12)

AttCommand.Parameters("@in_week_ending").Value = "28-MAY-2004"

AttCommand.Parameters.Add("@in_Monday", OdbcType.VarChar, 2)

AttCommand.Parameters("@in_Monday").Value = drpMonday.SelectedValue

AttCommand.Parameters.Add("@in_Tuesday", OdbcType.VarChar, 2)

AttCommand.Parameters("@in_Tuesday").Value = drpTuesday.SelectedValue

AttCommand.Parameters.Add("@in_Wednesday", OdbcType.VarChar, 2)

AttCommand.Parameters("@in_Wednesday").Value = drpWednesday.SelectedValue

AttCommand.Parameters.Add("@in_Thursday", OdbcType.VarChar, 2)

AttCommand.Parameters("@in_Thursday").Value = drpThursday.SelectedValue

AttCommand.Parameters.Add("@in_Friday", OdbcType.VarChar, 2)

AttCommand.Parameters("@in_Friday").Value = drpFriday.SelectedValue

AttCommand.Parameters.Add("@in_comments", OdbcType.VarChar, 80)

AttCommand.Parameters("@in_comments").Value = " "

myConnection.Open()

AttCommand.ExecuteNonQuery()

myConnection.Close()

 

Thanks, Shaun Kelly
Previous Topic: How to move a Blob file from one table to another?
Next Topic: Runtime java.lang.UnsatisfiedLinkError
Goto Forum:
  


Current Time: Fri Nov 22 15:55:43 CST 2024