Hola Grupo:
Estoy utilizando una pagina en donde tengo dos botones, Grabar y Dar de
Baja.
En ellos, al hacer clic, me llama a los sub Grabar o sub Baja, dependiendo
de lo que haga. Sin embargo, no funciona y no tengo la manera, en que parte
tengo el error.
Les proporciono las funciones y ojalá alguien gentilmente me oriente al
respecto
-
-
<script language="VbScript">
<!--
sub guardar_onclick
vLogin = Request.Form("Select1")
vLogin1=Login.value
vPassword=Password.value
if D1.selectedIndex=1 then
vNivel="Administrador"
end if
if D1.selectedIndex=2 then
vNivel="Coordinador"
end if
if D1.selectedIndex=3 then
vNivel="Lider"
end if
if D1.selectedIndex=4 then
vNivel="Supervisor"
end if
if D1.selectedIndex=5 then
vNivel="Usuario"
end if
' MSGBOX("GUARDAR"+vLogin1+vPassword+vNivel)
' MSGBOX(VLogin)
' strProvider = "Provider = Microsoft.JET.OLEDB.4.0;Data Source C:\Intranet\bdIntranet.mdb;"
' Set objConn = CreateObject("ADODB.Connection")
objConn.Open strProvider
strQuery = "UPDATE tUsuario SET LOGIN='" & vLogin1 & "', ;"
strQuery = strQuery & "PASS='" & vPassword & "', ;"
strQuery = strQuery & "NIVEL='" & vNivel & "'"
strQuery = strQuery & "WHERE Login='" & vLogin & "'"
Set objRS = objConn.Execute(strQuery)
msgbox(strQuery)
end sub
sub baja_onclick
Dim objConn, strQuery, objRS, strProvinder, Correcto, vLogin,
vPassword, vNivel
vLogin = Request.Form("Select1")
strProvider = "Provider = Microsoft.JET.OLEDB.4.0;Data Source
= C:\Intranet\bdIntranet.mdb;"
Set objConn = CreateObject("ADODB.Connection")
objConn.Open strProvider
strQuery = "DELETE FROM tUsuario Where login = '" & vLogin &
"' ;"
Set objRS = objConn.Execute(strQuery)
MSGBOX("BAJA"+vlogin)
end sub
</SCRIPT>
-
He intentado aplicar los MSGBox para checar los valores sin embargo no los
hace, y solo me muestra en la parte inferior de la página, el signo de
exclamación de color amarillo, diciendo error de página
Salu2 :-<
Leer las respuestas