×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

再请教,ASP调SQL读数据库,其中reference属性的格式是NTEXT,结果表格显示全部是空白的,但将reference改成NVCHAR就正常了,为什么?谢谢,程序如下:

本文发表在 rolia.net 枫下论坛<%sql="select a.qty,a.reference, a.pn as opn, b.*,c.bomdatabase, " &_
" Maker.MakerID,Maker.Maker,Maker.WWWURL," &_
" Maker_1.MakerID as supplierid,Maker_1.Maker as Supplier,Maker_1.WWWURL as supplierurl " &_
" from " & database & " a left outer join standardmaterials b on a.pn=b.pn " &_
" left outer join standardmaterialsbom c on a.pn=c.pn " &_
" left outer JOIN maker on b.mfrID = maker.MakerID " &_
" left outer JOIN maker maker_1 on b.vendorID = maker_1.MakerID order by a.pn"
set rs=con.Execute (sql)
while not rs.eof%>
<tr onmouseover="style.background='lightgreen'" onmouseout="style.background='#ffffee'">
<%if isnull(rs("bomdatabase")) or trim(rs("bomdatabase"))="" then%>
<td width="*"><%=rs("opn")%></td>
<%else%>
<td width="*"><img src="../images/clsdfold.bmp" height="12px" width="16px">
<a href="partslist.asp?db=<%=trim(rs("bomdatabase"))%>&pn=<%=rs("opn")%>" target="_blank"><%=rs("opn")%></td>
<%end if%>
<td width="*" class="left"><%=rs("title")%></td>
<td width="*" class="left"><%=rs("detail")%></td>
<td width="*" class="center"><%=rs("Maker")%>&nbsp;</td>
<td width="*" class="center"><%=rs("MfrPN")%>&nbsp;</td>
<td width="*" class="center"><%=rs("Supplier")%>&nbsp;</td>
<td width="*" class="center"><%=rs("vendorpn")%>&nbsp;</td>
<td width="*" class="center"><%=rs("qty")%></td>
<td width="*" class="center"><%=rs("price")%></td>
</tr>
<%rs.movenext
wend更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report