Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/05/2007, 01:19
Avatar de Bravenap
Bravenap
 
Fecha de Ingreso: noviembre-2002
Ubicación: Los Arroyos, El Escorial, Madrid
Mensajes: 2.084
Antigüedad: 22 años, 2 meses
Puntos: 4
Re: Error con conexión OLE (creo)

Detalles del error:

Cita:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Error Ole -2147467259: Error no especificado
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Error Ole -2147467259: Error no especificado

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: Error Ole -2147467259: Error no especificado]
IntraNet.Pruebas.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
Y el código:
Código:
Dim con As New OleDb.OleDbConnection(ConfigurationSettings.AppSettings("conOle"))
        Dim cmd As New OleDb.OleDbCommand("SELECT COUNT(*) FROM [Tabla de Provincias]", con)
        Try
            con.Open()
            Dim n As Integer = cmd.ExecuteNonQuery
            Response.Write(n)
        Catch ex As OleDb.OleDbException
            Throw New Exception("Error Ole " & ex.ErrorCode & ": " & ex.Message)
        Finally
            If con.State.Open = ConnectionState.Open Then
                con.Close()
            End If
        End Try

        cmd.Dispose()
__________________
¡¡NO A LA GUERRA!!
Si ponemos a nuestros mensajes títulos adecuados, la gente se animará más a abrirlos y resultarán más útiles en las busquedas. ¡No a los ayuuudaaa, urgenteee y similares!