ya lo encontre, copiaba la cadena con el punto y coma, solo que ahora si lleno un dataset me da un desbordamiento de pila y ya probe llenando tambien un datatable, no se porque si la consulta en la consola lo mas que me da son 800 filas
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
set serveroutput on
declare
priv1 NUMBER(2);
priv2 NUMBER(2);
priv3 NUMBER(2);
priv4 NUMBER(2);
privilegios varchar2(512);
cadena varchar2(1000);
begin
priv1:=1;--privilegio de insert
priv2:=1;--privilegio de update
priv3:=0;--privilegio de delete
priv4:=1;--privilegio de select
if priv1 > 0 then
privilegios:='INSERT';
end if;
if priv2 > 0 and privilegios is not null then
privilegios:=privilegios||','||'UPDATE';
end if;
if priv2 > 0 and privilegios is null then
privilegios:='UPDATE';
end if;
if priv3 > 0 and privilegios is not null then
privilegios:=privilegios||','||'DELETE';
end if;
if priv3 > 0 and privilegios is null then
privilegios:='DELETE';
end if;
if priv4 > 0 and privilegios is not null then
privilegios:=privilegios||','||'SELECT';
end if;
if priv4> 0 and privilegios is null then
privilegios:='SELECT';
end if;
cadena:='grant '||privilegios||' on '||' tab_estudiante '||' to '||' my_usuario';
dbms_output.put_line(cadena);
end;
select name from v$sysstat where value > 0 order by name;
select * from v$sgastat;
Public Class PaginaBase
Inherits Page
Protected Overrides Sub OnInit(e As EventArgs)
MyBase.OnInit(e)
If Me.Session("UserID") Is Nothing Then
Server.Transfer("login.aspx")
End If
End Sub
End Class
Public Class pagina
Inherits PaginaBase
Protected Overloads Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Imports Businness
Imports Modelo
Public Class inciso3
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub btnguardar_Click(sender As Object, e As EventArgs) Handles btnguardar.Click
Dim proveedor As New clsproveedor
proveedor.setid(Integer.Parse(txtid.Text))
proveedor.setnombre(txtnombreprov.Text)
proveedor.setdirec(txtdireccion.Text)
proveedor.settel(Integer.Parse(txttelefono.Text))
proveedor.setgiro(txtgiro.Text)
Dim prov As New proveedorBS
Dim row As Integer
row = prov.nuevoProveedor(proveedor)
If row > 0 Then
Me.lblMensaje.Text = "Insercion Correcta"
Else
Me.lblMensaje.Text = "Error en la Insercion"
End If
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.SessionPageStatePersister
Imports System.Web.Services.Protocols
Public Class PaginaBase
Inherits System.Web.UI.Page
Protected Overrides Sub OnInit(e As EventArgs)
MyBase.OnInit(e)
End Sub
Public Sub New()
Page_Load()
End Sub
Protected Sub Page_Load()
If Me.Session("UserID") Is Nothing Then
Server.Transfer("Login.aspx")
End If
End Sub
Public Shared Sub DisableControls(ByVal Parent As Control)
enabledControls(Parent, False)
End Sub
Public Shared Sub enabledControls(ByVal Parent As Control, ByVal b As Boolean)
Dim i As Integer = 0
Dim var As Integer = 0
'For i To Parent.Controls.Count -1
While i <= Parent.Controls.Count
If TypeOf Parent.Controls(i) Is Button Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is LinkButton Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is TextBox Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is DropDownList Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is ListBox Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is DataGrid Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is GridView Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is DataList Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is HtmlInputButton Then
Parent.Controls(i).EnableViewState = b
ElseIf TypeOf Parent.Controls(i) Is HtmlInputButton Then
Parent.Controls(i).EnableViewState = b
ElseIf Parent.Controls(i).HasControls Then
If b Then
EnableControls(Parent.Controls(i))
Else
DisableControls(Parent.Controls(i))
End If
End If
End While
'Next
End Sub
Public Shared Sub EnableControls(ByVal Parent As Control)
enabledControls(Parent, True)
End Sub
Public Function LoggedIn(HttpSessionState Session) as boolean
dim Result as boolean
Result = true
if Session("UserName") is nothing then
Result = false;
if Session("UserID") is nothing null then
Result = false;
return Result;
End Function
End Class
Public Class UCNavigation
Inherits System.Web.UI.UserControl
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Logged As Boolean
Logged = paginaBase.LoggedIn(Session)
If Me.lnkChangePassword.Enabled Then
Me.lnkChangePassword.CssClass = "izq"
Else
Me.lnkChangePassword.CssClass = "izqDesactivado"
End If
Page.ClientScript.RegisterStartupScript(Page.GetType(), "tttt", "ocultarEnlaces(" + Logged.ToString().ToLower() + ")", True)
Me.divLogin.Visible = Not Logged
If Logged Then
Me .lnkHome.CssClass = "izq";
Me.lblVentas.CssClass = "izq"
Me.lnkAddVenta.CssClass = "izq"
Me.lnkListVentass.CssClass = "izq"
Me.lblProductos.CssClass = "izq"
Me.lnkAddProducto.CssClass = "izq"
Me.lnkListProductos.CssClass = "izqDos"
Me.lblProveedores.CssClass = "izqDos"
Me.lnkAddProveedor.CssClass = "izqDos"
Me.lnkListProveedores.CssClass = "izqDos"
Me.lblCompras.CssClass = "izqDos"
Me.lnkAddCompra.CssClass = "izqDos"
Me.lnkLogout.CssClass = "izq"
Me.lnkListaCompras.CssClass = "izqDos"
Me.lblBalance.CssClass = "izqDos"
Me.lnkListaCompras.CssClass = "izqDos"
Me.lnkAddCompra.CssClass = "izqDos"
Me.lnkVerValance.CssClass = "izqDos"
Me.lnkCaja.CssClass = "izqDos"
Me.linkAddCliente.CssClass = "izqDos"
Me.linkListCliente.CssClass = "izqDos"
End If
End Sub
Protected Overrides Sub OnInit()
Me.InitializeComponent()
Base.OnInit()
End Sub
Private Sub InitializeComponent()
Base.Load += New EventHandler(Me.Page_Load)
End Sub
End Class
Public Class inciso3
Inherits System.Web.UI.Page
cmd.Parameters.AddWithValue("@idcurMat", (ViewState["idCursoMateria"]));'verificar tipo de dato de idCursoMateria
lsttabla.DataSource = tabla.empleados
lsttabla.DataValueField = "CODE"
lsttabla.DataTextField = "NAME"
lsttabla.DataBind()
Dim ds As DataSet
Try
con = New ConectDatos
Dim listaParam As List(Of OracleParameter) = New List(Of OracleParameter)
Dim param1 As OracleParameter = New OracleParameter("ResCursor", OracleDbType.RefCursor)
param1.Direction = ParameterDirection.Output
listaParam.Add(param1)
ds = New DataSet
ds = con.getdataset("USP_CARGA_EMPLEADO", listaParam)
Return ds
Public Function EjecutarQuery(ByVal spName As String, ByVal parameters As List(Of OracleParameter)) As Integer
Dim cmd As OracleCommand
'Dim row As Integer 'List(Of OracleParameter)
Try
Using conexion()
conexion.Open()
cmd = New OracleCommand(spName, conexion)
cmd = conexion.CreateCommand()
If Not parameters Is Nothing Then
cmd.CommandText = spName
cmd.CommandType = System.Data.CommandType.StoredProcedure
For Each p In parameters
cmd.Parameters.Add(p)
Next
End If
cmd.Connection.Open()
If cmd.ExecuteNonQuery() Then
Return 1
Else
Return 0
End If
End Using
Catch ex As Exception
Throw New ArgumentException("No se logro ejecutar la consulta en la DataBase " + ex.Message.ToString)
End Try
End Function