hey guys... new to this forum....
i have read a few posts... but (as you can guess) with no success....

well, as title says.. i have some problems with image uploading...
i'm using MS SQL Server 2003
coding in Visual Basic
and running asp pages to control a the dll....

so well the save function in the dll is:


VB Code:
  1. Public Function SaveRecord() As Long
  2. ConnectToDb
  3. Dim strSQL As String
  4. Dim rs As ADODB.Recordset
  5.  
  6. strSQL = "Select * from tblDb"
  7.  
  8. Set rs = New ADODB.Recordset
  9. rs.Open strSQL, cnn, adOpenKeyset, adLockOptimistic
  10.  
  11. rs.AddNew
  12.  
  13.  
  14.  
  15. rs!imgFile = imgFile
  16. rs!imgName = imgName
  17.  
  18.  
  19. rs.Update
  20. SaveRecord = rs!RecordId
  21. rs.Close
  22. End Function


Then as you can guess htere is a posting page (insert.html)

Code:
<form id="Inserimento" method="post" action="save.asp" ENCTYPE="multipart/form-data">


<tr><td><input type="file" name="imgFile" size="25"></td>
<td><input tabindex=0 type=text name="imgName" size=30></td>
<!--...continues with more boxes.. -->

and the save.asp page which calls the dll....

Code:
<%@ language=VBScript %>
<%Option Explicit %>
<html>
<head>
<title>Inserimento Eventi</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>


<%


Dim imgFile
Dim imgName


imgFile = Request.Form("imgFile")
imgName = Request.Form("imgName")



Dim x
set x = Server.CreateObject("project.class")

x.GetimgFile(imgFile)
x.GetimgName(imgName)

x.SaveRecord

set x = nothing

'response.redirect("insert.html")

%>


</body>
</html>

----------------

displaying:

VB Code:
  1. Public Sub SearchRecordId()
  2. Dim x As Long
  3. ConnectToDb
  4. Dim strSQL As String
  5. Dim rs As ADODB.Recordset
  6.  
  7. strSQL = "Select * from tblDb where RecordId=" & lngRecordId
  8.  
  9. Set rs = New ADODB.Recordset
  10. rs.Open strSQL, cnn, adOpenKeyset
  11.  
  12. If rs.RecordCount = 0 Then Exit Sub
  13.  
  14.  
  15. '-----------------------------
  16. imgFile = rs!imgFile
  17. imgName = rs!imgName
  18. '-----------------------------
  19.  
  20. rs.Close
  21. End Sub


VB Code:
  1. Public Function ReturnViewImage() As String
  2. ReturnViewImage = imgFile
  3. End Function



asp page:



Code:
<%
Dim strSearch
Dim lngRecordID

lngRecordID = Request.QueryString("ID")

Dim x
set x = Server.CreateObject("Project.Class")
x.GetRecordID(lngRecordID)
x.SearchRecordID
response.binarywrite(x.ReturnViewImage)
set x = nothing



%>
the last asp page requests the id from another page (and it works great...)

but the image is not returned... any ideas?
should i post ALL the code?
thx

ac3bf1