Click here to Skip to main content
16,006,006 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Basic-like authentication Pin
Hesham Amin18-May-04 23:06
Hesham Amin18-May-04 23:06 
GeneralIs there a forum that lists messages like this site's message board.... Pin
cyn_2003102715-May-04 17:30
cyn_2003102715-May-04 17:30 
GeneralRe: Is there a forum that lists messages like this site's message board.... Pin
alex.barylski16-May-04 3:01
alex.barylski16-May-04 3:01 
GeneralRe: Is there a forum that lists messages like this site's message board.... Pin
Paul Watson20-May-04 9:05
sitebuilderPaul Watson20-May-04 9:05 
Question2d arrays in ASP? Pin
Anonymous15-May-04 0:15
Anonymous15-May-04 0:15 
Generalwrite to browser from vb class Pin
sangeetha bhatta13-May-04 19:18
sangeetha bhatta13-May-04 19:18 
GeneralRe: write to browser from vb class Pin
Paul Watson15-May-04 1:53
sitebuilderPaul Watson15-May-04 1:53 
QuestionImage problem??? Pin
Small Rat13-May-04 9:23
Small Rat13-May-04 9:23 
Hi, EveryBody,

I want to display pictures stored in a database. First I use the following code(VB6) to save the picture to the database:

Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim stream As New ADODB.stream
Set cnn = New Connection


cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\test.mdb;"
cnn.CursorLocation = adUseClient
cnn.Open
Set rst = New Recordset
rst.ActiveConnection = cnn
rst.Open "t1", cnn, adOpenKeyset, adLockOptimistic
rst.AddNew
rst!p_name = "dd"
stream.Type = adTypeBinary
stream.Open
stream.LoadFromFile "H:\pp.jpg"
rst!pic = stream.Read
Set stream = Nothing
rst.Update
cnn.Close
------------------------------
and then I use the following code(ASP) to display the image:

<%
Dim cnn
Dim rs
' Clear existing HTTP header info
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear

' Set the HTTP header to an image type.
Response.ContentType = "image/JPEG"

cnnPubs=getdbconn() ' the function return the db connection
set rs=server.CreateObject("adodb.recordset")
rs.Open "SELECT FROM t1where id=1",cnn

Response.BinaryWrite rst("pic")
Response.End
%>

and I use to show the image.
the first(vb) code works well.
but I alway can not display the image, I just got a image like red X.

please help me to solve the problem.

Thanks a lot!!!


Best!

Alan
Generalinstalling PERL modules Pin
brianwelsch13-May-04 6:49
brianwelsch13-May-04 6:49 
GeneralRe: installing PERL modules Pin
Yasen Georgiew14-May-04 20:38
Yasen Georgiew14-May-04 20:38 
GeneralRe: installing PERL modules Pin
brianwelsch15-May-04 7:18
brianwelsch15-May-04 7:18 
GeneralBackup and Restore of Sharepoint Portal 2003 site Pin
Navneet Raorane13-May-04 5:30
Navneet Raorane13-May-04 5:30 
Generalurgent ASP question!!! Pin
Small Rat13-May-04 3:58
Small Rat13-May-04 3:58 
GeneralRe: urgent ASP question!!! Pin
Yasen Georgiew14-May-04 20:27
Yasen Georgiew14-May-04 20:27 
GeneralMachine to machine Pin
sta113-May-04 3:05
sta113-May-04 3:05 
GeneralHTTP to HTTPS Pin
Anonymous13-May-04 2:38
Anonymous13-May-04 2:38 
GeneralRe: HTTP to HTTPS Pin
Yasen Georgiew14-May-04 20:18
Yasen Georgiew14-May-04 20:18 
GeneralJavascript question Pin
pankajdaga11-May-04 23:52
pankajdaga11-May-04 23:52 
Generaldocument.getElementById, learn it, love it Pin
Paul Watson12-May-04 21:32
sitebuilderPaul Watson12-May-04 21:32 
Generalwindow.showmodaldialog Pin
chintan197911-May-04 23:06
chintan197911-May-04 23:06 
GeneralRe: window.showmodaldialog Pin
Andrew Quinn AUS18-May-04 4:14
Andrew Quinn AUS18-May-04 4:14 
Generaliframe question ( scrolling ) Pin
Maximilien11-May-04 15:19
Maximilien11-May-04 15:19 
QuestionDummy real time Credit Card Transaction?? Pin
mittalpa11-May-04 10:01
mittalpa11-May-04 10:01 
AnswerRe: Dummy real time Credit Card Transaction?? Pin
ian mariano11-May-04 19:28
ian mariano11-May-04 19:28 
GeneralSearch Form Results Pin
SmokeEater999911-May-04 9:54
SmokeEater999911-May-04 9:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.