I can not use any method from Oracle.DataAccess.Client

0

I just imported "Oracle.DataAccess.Client" to my file "Register.aspx.vb" but when calling the connection methods, they do not appear. Everything I am implementing in a function to call them in other elements.

Register.aspx.vb

Imports Oracle.DataAccess.Client
Imports SIMULADOR_DAO

Public Class Registrar
Inherits System.Web.UI.Page

Function Consultar(strSQL As String) As DataSet  

    Dim strConn As String = "User Id=WEB;Password=1Ytop6;Data Source=DES;Pooling=False"

    Dim conexion As New OracleConnection(strConn) 'AQUI EMPIEZA EL ERROR

    Dim cmd As New OracleCommand(strSQL, conexion) 'ERROR

    cmd.CommandType = CommandType.Text
    conexion.Open()

    Dim oda As New OracleDataAdapter(cmd) 'ERROR

    Dim ds As New DataSet
    oda.Fill(ds)

    conexion.Close()

    Return ds

End Function

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub btnRegistrar_Click(sender As Object, e As EventArgs) Handles btnRegistrar.Click

    Dim clRegistrar As New SIMULADOR_LOG.clsExamenLOG
    Dim User As New SIMULADOR_ENT.clsUsuarioSim
    With User
        .dni_user = txtDNI.Text
        .ape_pat_user = txtApellidoPaterno.Text
        .ape_mat_user = txtApellidoMaterno.Text
        .nombre_user = txtNombres.Text
        .direccion_user = txtDireccion.Text
        .celular_user = txtCelular.Text
        .correo_user = txtCorreo.Text
        '.ubigeo =
        .fech_nacimiento = txtFechaNacimiento.Text
    End With

    Dim mensajeLog As String = clRegistrar.RegistrarUsuario(User)

    Dim Mensaje As String = "<script type=""text/javascript"">" &
                                "Message('El sistema dice: " & mensajeLog & "')</script>"

    ClientScript.RegisterStartupScript(Me.GetType, "msg", Mensaje)

End Sub

Protected Sub cmbDepartamento_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDepartamento.SelectedIndexChanged

End Sub

Protected Sub cmbProvincia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbProvincia.SelectedIndexChanged

End Sub

Protected Sub cmbDistrito_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDistrito.SelectedIndexChanged

End Sub

End Class
    
asked by Gian Franco Alexis Poma Vidal 09.12.2018 в 08:10
source

0 answers