I'm am using VS.NET 2003 to build a web application that displays data from Oracle 8. In my data access layer project, I have a function that returns a data set:
The actual query takes 2-3 seconds to run. I want to use something similar to a stored procedure. This is easily done if I was using SQL Server back-end since I can write stored procedure to return the result. I have notice doing so also improves my application performance. Can I do something similar in Oracle? I have yet to find a way.
Code:
Function getDATA() As DataSet
Dim objCommand As New OracleCommand(strSQL, objConnection)
Dim objDataAdapter As New OracleDataAdapter(objCommand)
Dim objDataSet As New DataSet
'Generate SQL statement
strSQL = "SELECT * FROM TABLE1"
objCommand.CommandText = strSQL
objDataAdapter.Fill(objDataSet)
Return objDataSet
End Function
The actual query takes 2-3 seconds to run. I want to use something similar to a stored procedure. This is easily done if I was using SQL Server back-end since I can write stored procedure to return the result. I have notice doing so also improves my application performance. Can I do something similar in Oracle? I have yet to find a way.