Skip to Main Content

Database Software

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 to call DB Functions in VB.NET

632319Apr 9 2008
Hi All.....

I am very new to .net and my first proj is for a PDA..... I have installed Oracle Client... However the command seems to be quite different from the others...

I am trying to call a database function.

My code is as follows:

Dim cmd1 As LiteCommand = con.CreateCommand()

cmd1.CommandText = "fncEncryptPsswd"
cmd1.CommandType = CommandType.StoredProcedure
Dim p1 As New OracleParameter("p_input1", DbType.String)
p1.Value = UCase(Trim(txtPsword.Text))
p1.Direction = ParameterDirection.Input
cmd1.Parameters.Add(p1)

Dim p2 As New OracleParameter("output1", DbType.String)
p2.Direction = ParameterDirection.ReturnValue
cmd1.Parameters.Add(p2)
cmd1.ExecuteNonQuery()

con.Close()

It throws the error:

37000[POL- 5228] syntax error

Any help in this regard is highly appreciated.

Regards...
Rinjin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2008
Added on Apr 9 2008
0 comments
1,430 views