Oledb error

Discussion in 'ASP.NET / ASP.NET Core' started by macaferrer, Sep 12, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Can anyone tell me what this error means?, i've been reviewing the code many times and i can't figure out what is wrong. Thanks in advance.

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

    Not a valid file name.
    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.Data.OleDb.OleDbException: Not a valid file name.
    [?]

    Macarena Ferrer
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Please post code.


    quote:Originally posted by macaferrer

    Can anyone tell me what this error means?, i've been reviewing the code many times and i can't figure out what is wrong. Thanks in advance.

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

    Not a valid file name.
    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.Data.OleDb.OleDbException: Not a valid file name.
    [?]

    Macarena Ferrer
    </blockquote id="quote"></font id="quote">
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    miConexion = New OleDbConnection ("provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=http://www.losrosales.cl/aspbox/losrosalesdata.mdb")

    This line is wrong

    Try

    miConexion = New OleDbConnection ("provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & server.mappath("/aspbox/losrosalesdata.mdb"))


    quote:Originally posted by macaferrer

    The code is:

    <%@ Page Language="VB" Debug="false" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Data.OleDb" %>

    <script runat="server">
    Sub Page_Load(obj As Object, e As EventArgs)
    Dim miConexion as oledbConnection
    Dim miComando as oledbCommand
    Dim I As Integer
    miConexion = New OleDbConnection ("provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=http://www.losrosales.cl/aspbox/losrosalesdata.mdb")
    miConexion.open()
    Dim nombre = Request.QueryString("nombre")
    Dim rut = Request.QueryString("rut")
    Dim direccion = Request.QueryString("direccion")
    Dim comuna = Request.QueryString("comuna")
    Dim ciudad = Request.QueryString("ciudad")
    Dim telefono = Request.QueryString("telefono")
    Dim comentarios = Request.QueryString("comentarios")
    Dim strSQL As String = "INSERT INTO reservas (nombre, rut, email, direccion, comuna, ciudad, telefono, comentarios, codigo1, cantidad1, codigo2, cantidad2, codigo3, cantidad3, codigo4, cantidad4, codigo5, cantidad5, codigo6, cantidad6, codigo7, cantidad7, codigo8, cantidad8, codigo9, cantidad9, codigo10, cantidad10)" & "VALUES (nombre, rut, email, direccion, comuna, ciudad, telefono, comentarios, 100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 900, 1000, 1000);"
    miComando = New OleDbCommand(strSQL, miConexion)
    I = miComando.ExecuteNonQuery()
    lblMensaje.Text = "¡Hola " & nombre & "!<p>" & _
    "Su rut es : " & rut & "
    <p>" & _
    "Su direccion es: " & direccion &" " & comuna & " " &ciudad & "
    <p>" & _
    "Su telefono es: " & telefono & "
    "
    miConexion.close()
    End Sub
    </script>

    <html>
    <form runat="server">
    <asp:Label id="lblEncabezado" runat="server"
    Height="25px" Width="100%" Backcolor="#ddaa66"
    Forecolor="white" Font-Bold="true"
    Text="Un ejemplo de controles Web" />


    <asp:Label id="lblMensaje" runat="server" /><p>

    </form>
    </body></html>


    THANKS.

    quote:Originally posted by bruce

    Please post code.


    quote:Originally posted by macaferrer

    Can anyone tell me what this error means?, i've been reviewing the code many times and i can't figure out what is wrong. Thanks in advance.

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

    Not a valid file name.
    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.Data.OleDb.OleDbException: Not a valid file name.
    [?]

    Macarena Ferrer
    </blockquote id="quote"></font id="quote">
    </blockquote id="quote"></font id="quote">

    Macarena Ferrer
    </blockquote id="quote"></font id="quote">
     
  4. The code is:

    <%@ Page Language="VB" Debug="false" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Data.OleDb" %>

    <script runat="server">
    Sub Page_Load(obj As Object, e As EventArgs)
    Dim miConexion as oledbConnection
    Dim miComando as oledbCommand
    Dim I As Integer
    miConexion = New OleDbConnection ("provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=http://www.losrosales.cl/aspbox/losrosalesdata.mdb")
    miConexion.open()
    Dim nombre = Request.QueryString("nombre")
    Dim rut = Request.QueryString("rut")
    Dim direccion = Request.QueryString("direccion")
    Dim comuna = Request.QueryString("comuna")
    Dim ciudad = Request.QueryString("ciudad")
    Dim telefono = Request.QueryString("telefono")
    Dim comentarios = Request.QueryString("comentarios")
    Dim strSQL As String = "INSERT INTO reservas (nombre, rut, email, direccion, comuna, ciudad, telefono, comentarios, codigo1, cantidad1, codigo2, cantidad2, codigo3, cantidad3, codigo4, cantidad4, codigo5, cantidad5, codigo6, cantidad6, codigo7, cantidad7, codigo8, cantidad8, codigo9, cantidad9, codigo10, cantidad10)" & "VALUES (nombre, rut, email, direccion, comuna, ciudad, telefono, comentarios, 100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 900, 1000, 1000);"
    miComando = New OleDbCommand(strSQL, miConexion)
    I = miComando.ExecuteNonQuery()
    lblMensaje.Text = "¡Hola " & nombre & "!<p>" & _
    "Su rut es : " & rut & "
    <p>" & _
    "Su direccion es: " & direccion &" " & comuna & " " &ciudad & "
    <p>" & _
    "Su telefono es: " & telefono & "
    "
    miConexion.close()
    End Sub
    </script>

    <html>
    <form runat="server">
    <asp:Label id="lblEncabezado" runat="server"
    Height="25px" Width="100%" Backcolor="#ddaa66"
    Forecolor="white" Font-Bold="true"
    Text="Un ejemplo de controles Web" />


    <asp:Label id="lblMensaje" runat="server" /><p>

    </form>
    </body></html>


    THANKS.

    quote:Originally posted by bruce

    Please post code.


    quote:Originally posted by macaferrer

    Can anyone tell me what this error means?, i've been reviewing the code many times and i can't figure out what is wrong. Thanks in advance.

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

    Not a valid file name.
    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.Data.OleDb.OleDbException: Not a valid file name.
    [?]

    Macarena Ferrer
    </blockquote id="quote"></font id="quote">
    </blockquote id="quote"></font id="quote">

    Macarena Ferrer
     
  5. IT WORKED. THANK YOU VERY MUCH.

    Macarena Ferrer
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page