31 January 2012
execute stored procedure oracle melalui .NET
menggunakan oracle data access (sepertinya penerus namespace oracle client di .NET)
Dim dbconnection As New OracleConnection
Dim dbcommand As OracleCommand
dbconnection.ConnectionString = connStrToDb 'isi dengan connection string ke server oracle
dbcommand.Connection = dbconnection
dbcommand.CommandText = namaSPdiOracle 'ganti dengan nama sp yang akan di execute
dbcommand.CommandType = CommandType.StoredProcedure
'parameter yang dibutuhkan sp yang bersangkutan
dbcommand.Parameters.Add("p_bulantahun", OracleDbType.Varchar2, 7).Value = txtPeriode.Text
dbcommand.Parameters.Add("p_Sandibank", OracleDbType.Varchar2, 3).Value = txtSandiBank.Text
'execute sp, pada contoh ini tidak mengembalikan nilai
dbcommand.ExecuteNonQuery()
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment