Results 1 to 2 of 2

Thread: Upload

  1. #1
    Join Date
    Dec 1969

    Default Upload

    Do I need to do anything different to save as html files?<BR><BR>Set objUpload = Server.CreateObject("Dundas.Upload.2")<BR><BR>&#03 9;temporarily save uploaded files to disk<BR>objUpload.Save "c: emp"<BR><BR>&#039;set the connection string<BR>strConnect = "Driver={SQL Server};Server=SOMESERVER;Database=Temp;UID=sa;PWD ="<BR><BR>&#039;create an ADO recordset<BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR><BR>&#03 9;open a recordset using the connection string<BR>rs.Open "Test", strConnect, 2, 3<BR><BR><BR>For Each objFile In objUpload.Files<BR><BR>If InStr(1,objFile.ContentType,"image") &#060;&#062; 0 Then<BR><BR>&#039;add a new record and insert the image file<BR>rs.AddNew<BR>rs("Picture").Value = objFile.Binary<BR><BR>End If<BR><BR>Next<BR><BR>&#039;save changes and close recordset<BR>rs.Update<BR>rs.Close<BR><BR>&#039;re lease resources<BR>Set rs = Nothing<BR>Set objUpload = Nothing<BR>%&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Upload

    well since they&#039;re not binary and not images, you WILL need to change that code, yes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts