SA FileUp Problem

Results 1 to 2 of 2

Thread: SA FileUp Problem

  1. #1
    R Gibson Guest

    Default SA FileUp Problem

    Hello all,<BR><BR>Here&#039s my problem...<BR><BR>I am receiving the following error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e21&#039 <BR><BR>Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.<BR><BR>The following is the code which produces the error:<BR><BR>&#060;%<BR>else<BR> Randomize <BR> <BR> set upl = Server.CreateObject("SoftArtisans.FileUp")<BR> upl.Path = "d: hisismypath\"<BR> <BR> strFileName = Session("ReqUser") & Int((20*Rnd) +1) & Second(Now()) & Right(upl.UserFileName, 4)<BR> <BR> upl.Form("File1").SaveAs strFileName <BR><BR> strSql = "Select * from ReqTechData"<BR> oRs.Open strSql, oConn, adOpenDynamic, adLockOptimistic, adCmdText<BR> <BR> oRs.AddNew<BR> oRs("Owner") = Session("ReqUser")<BR> oRs("QuoteFileName") = upl.UserFileName<BR> oRs.Update<BR> <BR> end if<BR>%&#062;<BR><BR>The file uploads fine, however when trying to insert the file name into the DB, it blows up. Any help you might be able to provide would be greatly appreciated!<BR><BR>My DB is SQL Server 7.0<BR><BR>Any ideas/suggestions would be appreciated...<BR><BR>Thanks,<BR><BR>R Gibson

  2. #2
    SPG Guest

    Default Debugging Suggestion

    Replace (if possible, otherwise just do this for debugging) your database work with the following:<BR><BR>oConn.execute("insert into ReqTechData (Owner, QuoteFileName) values (&#039" & Session("ReqUser") & "&#039, &#039" & upl.UserFileName & "&#039)")<BR><BR>Hopefully if this one fails it will at least tell you what it was trying to do when it died. (Regardless, it&#039s better for your server resources to do a one-hit SQL insert as opposed to the ADO Recordset nonsense...)

Posting Permissions

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