Problemas al actualizar datos en asp
Publicado por Ringo (9 intervenciones) el 05/09/2006 21:35:27
Necesito su ayuda tengo un probema al momento de actualizar datos de una tabla y me carca el sigueinte error :
7host ASP Hosting
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/cventura/Prueba/ActualizarPreguntas.asp, line 40
el archivo que actualiza la base de datos se llama actualizarpreguntas.asp :
------------------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#Include file="Conexion.asp"-->
<%
'Decalre the variables
Dim SQLUpdateEdit
'##################################################################
'Notes about the form field names and the associated database
'data types and field name
'##################################################################
'##################################################################
'For ease of the SQL insert statement place the values of the form
'into variables so we can easier identify them
'##################################################################
dim strNumero1, strPregunta1
strNumero1 = Request.form("txtnumero1")
strPregunta1 = Request.form("txtpregunta1")
'##################################################################
'Write the SQL string to update the record
'##################################################################
SQLUpdateEdit = "UPDATE tblUsuarios SET"
SQLUpdateEdit = SQLUpdateEdit & " Numero='" & strNumero1 & "', "
SQLUpdateEdit = SQLUpdateEdit & " Pregunta='" & strPregunta1 & "'"
SQLUpdateEdit = SQLUpdateEdit & " WHERE Id_Pregunta = " & Request.QueryString("Rec") & ";"
'##################################################################
'Now tell the script to execute the SQL string on the database
'##################################################################
conn.execute SQLUpdateEdit
'##################################################################
'Tidy up any open connections and redirect the user to the main page
'##################################################################
conn.close
SET conn = Nothing
Response.Redirect("MuestraPreguntas.asp")
%>
7host ASP Hosting
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/cventura/Prueba/ActualizarPreguntas.asp, line 40
el archivo que actualiza la base de datos se llama actualizarpreguntas.asp :
------------------------------------------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#Include file="Conexion.asp"-->
<%
'Decalre the variables
Dim SQLUpdateEdit
'##################################################################
'Notes about the form field names and the associated database
'data types and field name
'##################################################################
'##################################################################
'For ease of the SQL insert statement place the values of the form
'into variables so we can easier identify them
'##################################################################
dim strNumero1, strPregunta1
strNumero1 = Request.form("txtnumero1")
strPregunta1 = Request.form("txtpregunta1")
'##################################################################
'Write the SQL string to update the record
'##################################################################
SQLUpdateEdit = "UPDATE tblUsuarios SET"
SQLUpdateEdit = SQLUpdateEdit & " Numero='" & strNumero1 & "', "
SQLUpdateEdit = SQLUpdateEdit & " Pregunta='" & strPregunta1 & "'"
SQLUpdateEdit = SQLUpdateEdit & " WHERE Id_Pregunta = " & Request.QueryString("Rec") & ";"
'##################################################################
'Now tell the script to execute the SQL string on the database
'##################################################################
conn.execute SQLUpdateEdit
'##################################################################
'Tidy up any open connections and redirect the user to the main page
'##################################################################
conn.close
SET conn = Nothing
Response.Redirect("MuestraPreguntas.asp")
%>
Valora esta pregunta


0