PDA

View Full Version : Oledb error


macaferrer
09-12-2003, 01:51 AM
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

bruce
09-13-2003, 10:00 AM
Please post code.


[b]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">

bruce
09-23-2003, 07:14 AM
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"))


[b]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>[b]
<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.

[b]quote:Originally posted by bruce

Please post code.


[b]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">

macaferrer
09-23-2003, 12:38 PM
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>[b]
<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.

[b]quote:Originally posted by bruce

Please post code.


[b]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

macaferrer
09-25-2003, 08:03 AM
IT WORKED. THANK YOU VERY MUCH.

Macarena Ferrer