B
blopmir
I´m try to load a recordset from Oracle Strored Procedure, if the
procedure don´t has input parameters i can do that, but if the
procedure need input parameter the webform fail.
This is my code
Try
Dim cnOra As New OleDbConnection("Provider=MSDAORA;Data
Source=XXX;user id=XX;password=XX;persist security info=false;")
Dim cmdPerson As New OleDbCommand("{call
PackPerson.person({resultset 3,ssn, fname, lname})}", cnOra)
'cmdPerson.Parameters.Add(New OleDbParameter("Cod",
OleDbType.Numeric, 9)).Value = 666223333
Dim daPerson As New OleDbDataAdapter(cmdPerson)
cnOra.Open()
Dim myReader As OleDbDataReader
myReader = cmdPerson.ExecuteReader()
While myReader.Read
Label1.Text = CStr(myReader.GetDecimal(0))
End While
myReader.Close()
cnOra.Close()
Catch exc As OleDb.OleDbException
Response.Write(exc.ToString)
End Try
Technical info:
.Net FrameWork 1.0
Language VB.Net
Oracle DB = 8.1.0.5
Client = OLEDB
What i need to execute my stored procedure like in oracle?
Regards
procedure don´t has input parameters i can do that, but if the
procedure need input parameter the webform fail.
This is my code
Try
Dim cnOra As New OleDbConnection("Provider=MSDAORA;Data
Source=XXX;user id=XX;password=XX;persist security info=false;")
Dim cmdPerson As New OleDbCommand("{call
PackPerson.person({resultset 3,ssn, fname, lname})}", cnOra)
'cmdPerson.Parameters.Add(New OleDbParameter("Cod",
OleDbType.Numeric, 9)).Value = 666223333
Dim daPerson As New OleDbDataAdapter(cmdPerson)
cnOra.Open()
Dim myReader As OleDbDataReader
myReader = cmdPerson.ExecuteReader()
While myReader.Read
Label1.Text = CStr(myReader.GetDecimal(0))
End While
myReader.Close()
cnOra.Close()
Catch exc As OleDb.OleDbException
Response.Write(exc.ToString)
End Try
Technical info:
.Net FrameWork 1.0
Language VB.Net
Oracle DB = 8.1.0.5
Client = OLEDB
What i need to execute my stored procedure like in oracle?
Regards