Click here to Skip to main content
15,905,614 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wrote this code in vb6 , it 's work

But it 's error on ASP

How do i resolve this problem.

PS:please observe the position wich i made underline
XML
Set Stream = Server.CreateObject("adodb.Stream")

Set rx = Server.CreateObject("adodb.recordset")<br>
rx.open "select top 1 Picturefield from databasePicture",cn,3,3


if not rx.eof then
Stream.open<br>
<big>Stream.Write rx("Picturefield") '<-- This line generate err-->ADODB.Stream error '800a0bb9'
<br>If </br></big>fso.FileExists(px & filename ) Then 'check old file exists!<br>
fso.DeleteFile  px & filename  'delete old file<br>
end if
Stream.SaveToFile  px & filename    'save bin to file<br>
Stream.Close<br>
Set Stream = Nothing <br>
End if</br></br></br></br></br></br></br>



Posted
Updated 13-Dec-10 13:54pm
v4
Comments
Toniyo Jackson 13-Dec-10 7:27am    
Corrected the alignment.
Dave Kreskowiak 13-Dec-10 15:42pm    
You left out the most important part of your question. WHAT'S THE ERROR?!
Sandeep Mewara 13-Dec-10 23:29pm    
Update the question with error.

1 solution

Why didn't you included the complete error message in your question otherwise you would get the solution 2 days ago.

Full error message is:
ADODB.Stream error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. 

Any way try the below link which has answer.

You need to reference the ado constants....also compare the code with the referred ink.

ADODB.Stream error[^]
 
Share this answer
 
v2
Comments
Dalek Dave 15-Dec-10 18:32pm    
You must be psychic!
thatraja 15-Dec-10 18:43pm    
Not at all/may be. Actually I was worked AB6, ASP too which is the main reason to remember the errors. :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900