Cita:
Iniciado por u_goldman
Código:
cmd = "insert into prueba (folio,nombre,puesto,area,telefono,sueldo,fecha_in greso,turno) values "&_
" ('" & txtfolio & "','" & txtnombre & "','" & txtpuesto & "','" & txtarea & "'," & txttelefono & "," & txtsueldo & "," & txtfecha & ",'" & txtturno & "')"
Response.Write(cmd)
Response.End
set rs = conn.execute(cmd) ----->linea 70
Y pega la salida aqui.
saludos
pongo todo el codigo de la paguina de prueba:
<%
dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString ="driver=SQL Server;server=DESARROLLO;uid=prueba;pwd=prueba;dat abase=EXTERNA"
conn.Open
Set cmd = Server.CreateObject("adodb.command")
cmd.ActiveConnection = conn
cmd.CommandText = "SELECT * from prueba"
dim rs
set rs = Server.CreateObject("ADODB.Recordset")
Set rs = cmd.Execute
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>altas</title>
<style type="text/css">
<!--
body,td,th {
color: #000000;
}
body {
background-color: #FF9D3C;
}
.style1 {
font-size: 24px;
font-weight: bold;
}
-->
</style></head>
<body>
<p align="center" class="style1">ALTAS</p>
<form id="form1" name="form1" method="post" action="">
<label><br>
FOLIO
<input name="txtfolio" type="text" id="txtfolio"/>
</label>
<div align="left"></div>
<p align="left">NOMBRE
<input type="text" name="txtnombre"/>
PUESTO
<input type="text" name="txtpuesto"/>
AREA
<input type="text" name="txtarea"/>
</p>
<p>TELEFONO
<input type="text" name="txttelefono"/>
</p>
SUELDO
<input type="text" name="txtsueldo"/>
FECHA
<input type="text" name="txtfecha"/>
TURNO
<input type="text" name="txtturno"/>
</form>
<form name="form2" method="post" action="">
<div align="center">
<input type="submit" name="Submit" value="Guardar">
</div>
</form>
<%
cmd = "insert into prueba (folio,nombre,puesto,area,telefono,sueldo,fecha_in greso,turno) values "&_
" ('" & txtfolio & "','" & txtnombre & "','" & txtpuesto & "','" & txtarea & "'," & txttelefono & "," & txtsueldo & "," & txtfecha & ",'" & txtturno & "')"
set rs = conn.execute(cmd)
%>
<p> </p>
<p> </p>
</body>
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
</html>