
08/11/2008, 15:16
|
| | Fecha de Ingreso: abril-2008
Mensajes: 425
Antigüedad: 17 años Puntos: 2 | |
Respuesta: Consulta en una relacion de muchos a muchos Bueno, ya lo hice, posteo mi solucion...aunque seguro no es la mejor fue la unica que se me ocurrio
combo= trim(Request.Form("d1"))
Set oConn = Server.CreateObject ("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath("./mensajes.mdb")
sql= "select * from materias WHERE materia = '"& combo &"'"
Set RS = Server.CreateObject ("ADODB.RecordSet")
RS.Open sql, oConn
id = rs("idmateria")
rs.close
sql= "SELECT dictan.*, profesores.* FROM dictan, profesores WHERE profesores.legajo=dictan.legajo and profesores.dicta= true and dictan.idmateria= '"& id &"'"
Set RS = Server.CreateObject ("ADODB.RecordSet")
RS.Open sql, oConn |