Public Function openDataReader(ByVal sProc As String) As SqlDataReader Try If gblnConn Then 'Set Command properties With mSQLCmd .Connection = mSQLConn .CommandType = CommandType.StoredProcedure .CommandText = sProc openDataReader = .ExecuteReader(CommandBehavior.CloseConnection) End With Return openDataReader End If Catch ex As Exception mstrError = ex.Message End Try End Function
public OracleDataReader OpenDataReader(string sProc) { try { if (gblnConn) { mORACmd = mORAConn.CreateCommand(); mORACmd.CommandText = sProc; mORACmd.CommandType = CommandType.StoredProcedure; mORADReader = mORACmd.ExecuteReader(CommandBehavior.CloseConnection); return mORADReader; } } catch(Exception ex) { mstrError = ex.Message; } }