![classic asp file upload example classic asp file upload example](http://2.bp.blogspot.com/-f1Ub1qyMM14/UCxIizVEx5I/AAAAAAAAC_4/tEvs0Fb1riU/s1600/upload+panel.png)
'Save to connectionless client side recordset, write to stream, If psFileFullPath "" and psFileInputName "" then Public Property Let FileInputName(sValue) If LCase(oFields(lnIndex).FieldName) = LCase(avKeyIndex) Then If nFieldCount > avKeyIndex And avKeyIndex > -1 Then Private Function IndexOf(ByVal avKeyIndex) Public Property Get BinaryDataOf(ByRef avKeyIndex)īinaryDataOf = oFields(lnIndex).BinaryData Public Property Get LengthOf(ByRef avKeyIndex) Public Property Get FileNameOf(ByRef avKeyIndex) Public Property Get ValueOf(ByRef avKeyIndex) If LCase(oFields(lnIndex).FieldName) = LCase(asFieldName) Then This is the clsupload.asp file that I have used for file upload = asFieldName And asFieldName > -1 Then StrMailUpdDate,strUploadTime,strUploadId,strStatus, pErrorcode) StrComments,strAccNo,strPolicyNo,strBranchConfDate,strConfBy,strSheetUpdDate,_ IntRecordId = obj.InsertData(strInputDate,strPayer,strAmount,strTransType,strPayee,strAddRemarks,_ StrUploadId = convertNullString(strUploadId) StrUploadTime = convertNullDate(strUploadTime) StrMailUpdDate = convertNullDate(strMailUpdDate) StrSheetUpdDate = convertNullDate(strSheetUpdDate) StrBranchConfDate = convertNullDate(strBranchConfDate) StrPolicyNo = convertNullString(strPolicyNo) StrComments = convertNullString(strComments) StrAddRemarks = convertNullString(strAddRemarks) StrTransType = convertNullString(strTransType) StrInputDate = convertNullDate(strInputDate) StrRecordId = convertNullString(strRecordId) 'lineData = replace(lineData,chr(13),",") Set fs = fso.OpenTextFile(Server.MapPath("entry/" & sFile), 1, False) Set fso = Server.CreateObject("Scripting.FileSystemObject") Response.write "Failed due to the following error: " & o.Error
![classic asp file upload example classic asp file upload example](https://i.ytimg.com/vi/xZEAVnU9Fac/maxresdefault.jpg)
O.FileFullPath = Server.MapPath(".") & "entry" & sFile SFileSplit = split(o.FileNameOf("txtFile"), "")
![classic asp file upload example classic asp file upload example](https://www.codeguru.com/wp-content/uploads/2021/07/vbscript_crd.gif)
RaiseGenError objCMTL,"Error while creating the object "
#Classic asp file upload example code#
Here is my code for uploading the CSV file and reading it and using a loop I’m iterating the values in the csv file and storing the values in my variables which is then passed to a method to store in DB.