Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/05/2004, 13:48
Matipsx
 
Fecha de Ingreso: mayo-2004
Mensajes: 2
Antigüedad: 21 años
Puntos: 0
Substituir resultado campos vacios

Buenas acabo de empezar con esto del asp y tengo una dudilla, tengo una base de datos la cual tiene el campos vacios, y me gustaria que una vez hago la consulta cambiar los registros vacios por por ejemplo (N/A),ya que si está vacio no me dibuja el borde de la tabla y pierde la linea.

He estado ojeando el foro y creo que deberia utilizar Len pero realmente soy muy novato y no me acabo de aclarar. Como veis en mi código a mi me interesaria lo de poner N/A en los campos "Skillrank" y "limitskill".

Gracias de ante mano por si podeis ayudarme.

<TABLE BGCOLOR="#FFFFFF" BORDER="1" BORDERCOLOR="#FBDF95"
WIDTH="700" CLASS="bodytextdark" ALIGN="left">
<TR>
<TD BGCOLOR="#FBDF95" ALIGN="CENTER">Nombre</TD>
<TD BGCOLOR="#FBDF95" ALIGN="CENTER">Skill Rank</TD>
<TD BGCOLOR="#FBDF95" ALIGN="CENTER">Limit Skill</TD>
<TD BGCOLOR="#FBDF95" ALIGN="CENTER">Cristal</TD>
<TD BGCOLOR="#FBDF95" ALIGN="CENTER">Receta</TD>
<TD BGCOLOR="#FBDF95" ALIGN="CENTER">Especial</TD>
<TD BGCOLOR="#FBDF95" ALIGN="CENTER">Guild</TD>
</TR>
<%do while not rs.EOF and cant_registros < mostrar%>
<TR>
<TD ALIGN="CENTER" >
<a class="blau"href="matiampliar.asp?id=<%=RS.Fields( "id")%>"><%=RS.Fields("item")%></TD>
<TD ALIGN="CENTER">
<%=RS.Fields("skillrank")%></TD>
<TD ALIGN="CENTER"><%=RS.Fields("limitskill")%></TD>
<TD ALIGN="CENTER"><a class="blau" href="mati.asp?nombre=<%=RS.Fields("cristal")%>&se ccion=cristal"><%=RS.Fields("cristal")%></TD>
<TD ALIGN="CENTER"><%
' matriz con ingredientes
ingre = Split(RS.Fields("receta"), ",", -1, 1)
for f=0 to ubound(ingre)
response.write("<a class='blau' href='mati.asp?nombre="&ingre(f)&"&seccion=receta' >"&ingre(f)&"</a>. ")
next
' cierro matriz
%></TD>
<TD ALIGN="CENTER"><%=RS.Fields("especial")%></TD>
<TD ALIGN="CENTER"><a class="blau" href="mati.asp?nombre=<%=RS.Fields("guild")%>&secc ion=guild"><%=RS.Fields("guild")%></TD>
</TR>

<%cant_registros = cant_registros +1
RS.MoveNext
Loop
end if
RS.Close
oConn.Close
Set RS = nothing
Set oConn = nothing
%></table><br><br>
</td></tr>
</table></td></tr></table>