• λ我爱Aspx >> Asp.Net >> 急求助!关于从ACCESS数据库中读取图片的问题
  • 急求助!关于从ACCESS数据库中读取图片的问题

  • :aspxer  Դ:csdn  :2007-7-6 2:48:46  ؼ:数据库,数据
  • 我是用ASP程序往数据库中存储的图片,类型是长二进制型,但是却不能正常显示在网页上,只是显示一个叉,不知道是因为什么?请高手帮忙!谢谢啦!!!我的读取图片的ASP源程序如下:<title>显示图片</title><%

    google_ad_width = 250; google_ad_height = 250; google_ad_format = "250x250_as"; google_color_url = "000000";

    Response.Buffer = True

    <!-- #include file="adovbs.inc" -->

    set connGraph=server.CreateObject("ADODB.connection")

    connGraph.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("images.mdb") & "; Jet OLEDB:Database Password=; Persist Security Info=False;"

    set rec=server.createobject("ADODB.recordset")

    strsql="select img from images where id=" & trim(request("id"))

    rec.open strsql,connGraph,3,1

    if not rec.eof then

    Response.ContentType = "image/gif"

    picsize=rec("img").ActualSize

    Response.BinaryWrite rec("img").getChunk(picsize)

    rec.close

    Ҷƪл˵?
  • һƪ如果按照顺序一切正常....怎么解决这问题?
    һƪ很感谢csdn论坛,希望聪明哥哥你能进来.很感谢你.