I want to store filename/path and date for all files in a special images folder.
I try to use the filesystem object and it reads up all files but when i submit I get a error.
I put the insert into in the loop statement but I get a error msg:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/updateDb.asp, line 49

Any ideas about this?
Thanks!/Martin

Code:
IF request.form ("Message")="True" THEN
Session.LCID = 1053
strURL = Request.ServerVariables("URL")
bildUrl="http://s14/Images/"
	strProvider="Driver=Microsoft Access Driver (*.mdb); DBQ=d:\Images.mdb;"
	set objConn = server.createobject("ADODB.Connection")
    objConn.Open strProvider
	set cm = Server.CreateObject("ADODB.Command")
	cm.ActiveConnection = objConn
	
end if
%>
<Table><tr>
<td><form name="files" action="<%= strURL %>" method="post">
<select name="search" class="list" size="20">
<%
'create file list
x=0
Dim objFileScripting, objFolder
    Dim filename, filecollection, strDirectoryPath, strUrlPath
    	strDirectoryPath="D:\Images"
    	strUrlPath="http:\\s14\Images"
    	Set objFileScripting = CreateObject("Scripting.FileSystemObject")
       	Set objFolder = objFileScripting.GetFolder("D:\Images")
    	Set filecollection = objFolder.Files
    	'go thru recs
For Each Filename In filecollection
    		Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
			Fileval = left(Filename, len(Filename)-4)
			Fileval=Replace(Fileval,"$","/")
			x=x+1
		    IF request.form ("Message")="True" THEN
			cm.CommandText ="INSERT INTO ImageTable(Image,Date) VALUES (?,?)" 
			set objparam=cm.createparameter(, 200, , 255,bildUrl&Filename)
			cm.parameters.append objparam
			set objparam=cm.createparameter(, 200, , 255, Date)
			cm.parameters.append objparam
			end if
			%><!--<option value="<%=filename%>"><%=fileval%></option>--><%
			IF request.form ("Message")="True" THEN
			cm.execute
  			Set objparam = Nothing
  			'cm.delete
			end if
	    	Next
			%>
</select></td></tr>
<tr>
<td><input type="submit" style="font-family: Tahoma; font-size: 10pt;"></td>
<input  type="HIDDEN" name="Message" value="True">
</tr></table>
</form>