Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/07/2003, 15:21
Avatar de Rriveros
Rriveros
 
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago
Mensajes: 214
Antigüedad: 22 años, 5 meses
Puntos: 0
guardar Info de un Combo Box a BD

Hola, tengo un Form en el cual tengo un Menu desplegable que muestra datos de la BD, lo que quiero que al seleccionar unos de esos datos el Formulario lo gurde, me guarda todo menos lo que seleccione en el combo bosx, que será?
<form action="procesar4.asp" method="post">
<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="80%" id="AutoNumber1">
<tr>
<TD align=middle></TD>
<td width="100%" colspan="4" align="middle"><b><font face="Tahoma">Ingreso Orden de Trabajo</font></b></td>
</tr>
<tr>
<td width="25%" align="middle">&nbsp;</td>
<td width="25%" align="middle">&nbsp;</td>
<td width="25%" align="middle">&nbsp;</td>
<td width="25%" align="middle">&nbsp;</td>
</tr>
<tr>
<td width="25%"><font face="Tahoma">Número de Orden</font></td>
<td width="50%" colspan="2"><font face="Tahoma"><input name="Nro_Orden" size ="10"></font></td>
<td width="25%">&nbsp;</td>
</tr>
<tr>
<td width="25%"><font face="Tahoma">Cliente</font></td>
<td width="40%"> <%
Dim oConn,strSQL, objRS, strSQL2, objRS2

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Servicios.mdb"))
strSQL = "SELECT Empresa, Telefono FROM Clientes"
strSQL2 = "SELECT Cod_Producto, Descripcion FROM Productos"
Set objRS = oConn.Execute(strSQL)
Set objRS2 = oConn.Execute(strSQL2)

%>

<select class="txtfield" name="Empresa">
<option>Seleccione...
<%

'Generamos el menu desplegable
Do While not objRS.eof%>

<option><%=objRS("Empresa")%>
&nbsp;&nbsp;&nbsp;Teléfono &nbsp;<%=objRS("Telefono")%>
<% objRS.movenext
Loop


%>


</td>
<td width="25%">&nbsp;</td>
<td width="25%">&nbsp;</td>
</tr>



<TR>
<TD width="25%"><FONT face=Tahoma>Descripción Problema</FONT></TD>
<TD width="50%" colSpan=2><INPUT style="WIDTH: 342px; HEIGHT: 54px"
size=44 name=Descripcion_Problema></TD>
<TD width="25%"></TD></TR>
<TR>
<TD width="25%"><FONT face=Tahoma>Informe</FONT></TD>
<TD width="50%" colSpan=2><INPUT style="WIDTH: 342px; HEIGHT: 57px"
size=44 name=informe></TD>
<TD width="25%"></TD></TR>
<tr>
<td width="25%"><font face="Tahoma">Código Producto</font></td>
<td width="50%" colspan="2">
<font face="Tahoma"><select Cod_Producto="Cod_Producto">
<option>Seleccione...</option>
<%

'Generamos el menu desplegable

Do While not objRS2.eof%>
<option><%=objRS2("Cod_Producto")%>
&nbsp;&nbsp;&nbsp;Descripción&nbsp;
<%=objRS2("Descripcion")%>
<% objRS2.movenext

Loop
%>
</select></font></td>
<td width="25%">&nbsp;</td>
</tr>
<tr>
<td width="25%"><font face="Tahoma">Valor Prestación</font></td>
<td width="25%"><font face="Tahoma"><input name="Valor_Prestacion" size="10" ></font></td>
<td width="25%">&nbsp;</td>
<td width="25%">&nbsp;</td>
</tr>
<tr>
<td width="25%"><font face="Tahoma">Fecha</font></td>
<td width="25%"><font face="Tahoma"><input name="Fecha" size="10" ></font></td>
<td width="25%">&nbsp;</td>
<td width="25%">&nbsp;</td>
</tr>
<tr>
<td width="25%"><font face="Tahoma">Tipo</font></td>
<td width="25%"><font face="Tahoma"><select size="1" name="Tipo">
<option value="Garantia">Garantía</option>
<option selected value="Reparacion">Reparación</option>
</select></font></td>
<td width="25%">&nbsp;</td>
<td width="25%">&nbsp;</td>
</tr>
<tr>
<td width="25%"><font face="Tahoma">Contacto</font></td>
<td width="25%"><font face="Tahoma"><input name="Contacto" size=44>
</font></td>
<td width="25%">&nbsp;</td>
<td width="25%">&nbsp;</td>
</tr>

</table>

<INPUT TYPE="submit" VALUE="Grabar">
</form>
__________________
www.nelhost.net