A couple of people have been great at helping me with this today and thanks. One final item. If I understood this particular code better I wouldn&#039;t have to struggle so much but all of your help is appreciated.<BR><BR>Below is the code that uploads the images from the users browser. Works great. I even have licked the problem of incrementing a counter that I think I need for the next step which is putting the image name into an Access database. The fields in the database are pic1 through pic10 should the user decide to upload that many. What I want to do is replace the code below marked with *** to insert the image name into the database. My concerne is that the connection would open and close 10 times if the user uploaded 10 images. Can anyone suggest how to approach this with a code example so I know what to place where?<BR><BR>&#060;% <BR>dim piccount<BR>Class FileUploader <BR>Public Files <BR>Private mcolFormElem <BR><BR>Private Sub Class_Initialize() <BR>Set Files = Server.CreateObject("Scripting.Dictionary") <BR>Set mcolFormElem = Server.CreateObject("Scripting.Dictionary") <BR>End Sub <BR><BR>Private Sub Class_Terminate() <BR>If IsObject(Files) Then <BR>Files.RemoveAll() <BR>Set Files = Nothing <BR>End If <BR>If IsObject(mcolFormElem) Then <BR>mcolFormElem.RemoveAll() <BR>Set mcolFormElem = Nothing <BR>End If <BR>End Sub <BR><BR>Public Property Get Form(sIndex) <BR>Form = "" <BR>If mcolFormElem.Exists(LCase(sIndex)) Then Form = mcolFormElem.Item(LCase(sIndex)) <BR>End Property <BR><BR>Public Default Sub Upload() <BR>Dim biData, sInputName <BR>Dim nPosBegin, nPosEnd, nPos, vDataBounds, nDataBoundPos <BR>Dim nPosFile, nPosBound <BR><BR>biData = Request.BinaryRead(Request.TotalBytes) <BR>nPosBegin = 1 <BR>nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13))) <BR><BR>If (nPosEnd-nPosBegin) &#060;= 0 Then Exit Sub <BR><BR>vDataBounds = MidB(biData, nPosBegin, nPosEnd-nPosBegin) <BR>nDataBoundPos = InstrB(1, biData, vDataBounds) <BR><BR>Do Until nDataBoundPos = InstrB(biData, vDataBounds & CByteString("--")) <BR><BR>nPos = InstrB(nDataBoundPos, biData, CByteString("Content-Disposition")) <BR>nPos = InstrB(nPos, biData, CByteString("name=")) <BR>nPosBegin = nPos + 6 <BR>nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34))) <BR>sInputName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) <BR>nPosFile = InstrB(nDataBoundPos, biData, CByteString("filename=")) <BR>nPosBound = InstrB(nPosEnd, biData, vDataBounds) <BR><BR>If nPosFile &#060;&#062; 0 And nPosFile &#060; nPosBound Then <BR>Dim oUploadFile, sFileName <BR>Set oUploadFile = New UploadedFile <BR><BR>nPosBegin = nPosFile + 10 <BR>nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34))) <BR>sFileName = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) <BR>oUploadFile.FileName = Right(sFileName, Len(sFileName)-InStrRev(sFileName, "\")) <BR><BR>nPos = InstrB(nPosEnd, biData, CByteString("Content-Type:")) <BR>nPosBegin = nPos + 14 <BR>nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13))) <BR><BR>oUploadFile.ContentType = CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) <BR><BR>nPosBegin = nPosEnd+4 <BR>nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2 <BR>oUploadFile.FileData = MidB(biData, nPosBegin, nPosEnd-nPosBegin) <BR><BR>If oUploadFile.FileSize &#062; 0 Then Files.Add LCase(sInputName), oUploadFile <BR>Else <BR>nPos = InstrB(nPos, biData, CByteString(Chr(13))) <BR>nPosBegin = nPos + 4 <BR>nPosEnd = InstrB(nPosBegin, biData, vDataBounds) - 2 <BR>If Not mcolFormElem.Exists(LCase(sInputName)) Then mcolFormElem.Add LCase(sInputName), CWideString(MidB(biData, nPosBegin, nPosEnd-nPosBegin)) <BR>End If <BR><BR>nDataBoundPos = InstrB(nDataBoundPos + LenB(vDataBounds), biData, vDataBounds) <BR>Loop <BR>End Sub <BR><BR>&#039;String to byte string conversion <BR>Private Function CByteString(sString) <BR>Dim nIndex <BR>For nIndex = 1 to Len(sString) <BR> CByteString = CByteString & ChrB(AscB(Mid(sString,nIndex,1))) <BR>Next <BR>End Function <BR><BR>&#039;Byte string to string conversion <BR>Private Function CWideString(bsString) <BR>Dim nIndex <BR>CWideString ="" <BR>For nIndex = 1 to LenB(bsString) <BR> CWideString = CWideString & Chr(AscB(MidB(bsString,nIndex,1))) <BR>Next <BR>End Function <BR>End Class <BR><BR>Class UploadedFile <BR>Public ContentType <BR>Public FileName <BR>Public FileData <BR><BR>Public Property Get FileSize() <BR>FileSize = LenB(FileData) <BR>End Property <BR><BR>Public Sub SaveToDisk(sPath) <BR>Dim oFS, oFile <BR>Dim nIndex <BR><BR>If sPath = "" Or FileName = "" Then Exit Sub <BR>If Mid(sPath, Len(sPath)) &#060;&#062; "\" Then sPath = sPath & "\" <BR><BR>Set oFS = Server.CreateObject("Scripting.FileSystemObject") <BR>If Not oFS.FolderExists(sPath) Then Exit Sub <BR><BR>Set oFile = oFS.CreateTextFile(sPath & FileName, True)<BR><BR>***&#039;keep a count of the number of pics<BR>***If piccount = "" then <BR>***piccount = 1<BR>***end if<BR><BR>***response.write "&#060;input type=text name=pic" & piccount & " ***value=" & FileName & " size=20&#062;<BR>" <BR><BR>***&#039;increase the count by 1 for each pic uploaded<BR>***piccount = piccount + 1<BR><BR>For nIndex = 1 to LenB(FileData) <BR> oFile.Write Chr(AscB(MidB(FileData,nIndex,1)))<BR>Next <BR><BR>oFile.Close <BR>End Sub <BR><BR>Public Sub SaveToDatabase(ByRef oField) <BR>If LenB(FileData) = 0 Then Exit Sub <BR><BR>If IsObject(oField) Then <BR>oField.AppendChunk FileData <BR>End If <BR>End Sub <BR><BR>End Class<BR><BR>%&#062; <BR>