Http 500 Internal Error

F

fennychieck

dear everyone..
i want to create one attachment which is trigerred once the user click
on "approve" button and each time user clicks, there will be one
attachment for that particular form.

before that, i need to let u know that, for case: "reject", i already
put below code. and it works fine. and now, after i put the code for
case: "approve", Http 500 error comes out.

below is the code which i duno wat's wrong with it. it only give me
Http 500 Internal Error.
How to solve it? I need your help.
Tx a lot for your help!

Const ForWriting = 2 ' Input OutPut mode
Const Create = True 'allows asp to create the file if it dun exist
Dim FSO ' FileSystemObject
Dim TSO ' TextStreamObject
' Use MapPath function to get the Physical Path of file
Dim strfileName1 : strfilename1 = ""
strfileName1 = "DIapp" & strAppAction & "_" & intSesEmpID & "_" &
Day(Date()) & Month(Date()) & Year(Date()) & "_" & Hour(now())&
Minute(now()) & Second(now()) & ".txt"
Dim MyFile

Dim MyString1 : MyString1 = "Variables Before Processing : " &
vbcrlf
MyString1 = MyString1 & "intCHID = " & intCHID & vbcrlf
MyString1 = MyString1 & "intEmpID = " & intEmpID & vbcrlf
MyString1 = MyString1 & "Status = " & strStatusCode & vbcrlf
MyString1 = MyString1 & "intCurrentLevel = " & intCurrentLevel &
vbcrlf
MyString1 = MyString1 & "intCurrentVersion = " & intCurrentVersion
& vbcrlf
MyString1 = MyString1 & "strCurrencyId = " & strCurrencyId &
vbcrlf
MyString1 = MyString1 & "strSolutionGroup = " & strSolutionGroup &
vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strOrigDate) = " &
ReplaceSingleQuote(strOrigDate) & vbcrlf
MyString1 = MyString1 & "strProductGM = " & strProductGM & vbcrlf
MyString1 = MyString1 & "strProductGMPct = " & strProductGMPct &
vbcrlf
MyString1 = MyString1 & "strTSGM = " & strTSGM & vbcrlf
MyString1 = MyString1 & "strTSGMPct = " & strTSGMPct & vbcrlf
MyString1 = MyString1 & "cdbl(strPSGM) = " & cdbl(strPSGM) &
vbcrlf
MyString1 = MyString1 & "cdbl(strPSGMPct) = " & cdbl(strPSGMPct) &
vbcrlf
MyString1 = MyString1 & "cdbl(strMSGM) = " & cdbl(strMSGM) &
vbcrlf
MyString1 = MyString1 & "cdbl(strMSGMPct) = " & cdbl(strMSGMPct) &
vbcrlf
MyString1 = MyString1 & "strTotalGM = " & strTotalGM & vbcrlf
MyString1 = MyString1 & "strTotalGMPct = " & strTotalGMPct & vbcrl
MyString1 = MyString1 & "ReplaceSingleQuote(strSalesOrderNo) = " &
ReplaceSingleQuote(strSalesOrderNo) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strPODate) = " &
ReplaceSingleQuote(strPODate) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strCustomerPONo) = " &
ReplaceSingleQuote(strCustomerPONo) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strDCQuotationNo) = "
& ReplaceSingleQuote(strDCQuotationNo) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strDeliverDate) = " &
ReplaceSingleQuote(strDeliverDate) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strInstallDate) = " &
ReplaceSingleQuote(strInstallDate) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strSalesUnit) = " &
ReplaceSingleQuote(strSalesUnit) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strCustomerType) = " &
ReplaceSingleQuote(strCustomerType) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strCustomerNewInd) = "
& ReplaceSingleQuote(strCustomerNewInd) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strPartialShipment) =
" & ReplaceSingleQuote(strPartialShipment) & vbcrlf
MyString1 = MyString1 & "strPartialShipmentLots = " &
strPartialShipmentLots & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strBillToParty) = " &
ReplaceSingleQuote(strBillToParty) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strBillAddress) = " &
ReplaceSingleQuote(strBillAddress) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strBillContact) = " &
ReplaceSingleQuote(strBillContact) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strBillTel) = " &
ReplaceSingleQuote(strBillTel) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strBillFax) = " &
ReplaceSingleQuote(strBillFax) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strSoldToParty) = " &
ReplaceSingleQuote(strSoldToParty) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strSoldAddress) = " &
ReplaceSingleQuote(strSoldAddress) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strSoldContact) = " &
ReplaceSingleQuote(strSoldContact) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strSoldTel) = " &
ReplaceSingleQuote(strSoldTel) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strSoldFax) = " &
ReplaceSingleQuote(strSoldFax) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strShipToParty) = " &
ReplaceSingleQuote(strShipToParty) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strShipAddress) = " &
ReplaceSingleQuote(strShipAddress) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strShipContact) = " &
ReplaceSingleQuote(strShipContact) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strShipTel) = " &
ReplaceSingleQuote(strShipTel) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strShipFax) = " &
ReplaceSingleQuote(strShipFax) & vbcrlf
MyString1 = MyString1 & "intCreatedByID = " & intCreatedByID &
vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strCreatedDateTime) =
" & ReplaceSingleQuote(strCreatedDateTime) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strApproveDate) = " &
ReplaceSingleQuote(strApproveDate) & vbcrlf
MyString1 = MyString1 & "strExchangeRate = " & strExchangeRate &
vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strRequestorRemarks) =
" & ReplaceSingleQuote(strRequestorRemarks) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strProjectName) = " &
ReplaceSingleQuote(strProjectName) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strAccountManager) = "
& ReplaceSingleQuote(strAccountManager) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strINRJQN) = " &
ReplaceSingleQuote(strINRJQN) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strVATServiceTax) = " &
ReplaceSingleQuote(strVATServiceTax) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strBGReq) = " &
ReplaceSingleQuote(strBGReq) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strWType) = " &
ReplaceSingleQuote(strWType) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strSType) = " &
ReplaceSingleQuote(strSType) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strRPR) = " &
ReplaceSingleQuote(strRPR) & vbcrlf
MyString1 = MyString1 & "strIsExcTo5KLmt = " & strIsExcTo5KLmt &
vbcrlf
MyString1 = MyString1 & "strIsExcToLML = " & strIsExcToLML &
vbcrlf
MyString1 = MyString1 & "strInsideSalesId = " & strInsideSalesId &
vbcrlf
MyString1 = MyString1 & "strInsideSalesDOId = " & strInsideSalesDOId
& vbcrlf
MyString1 = MyString1 & "strSpecSalesId = " & strSpecSalesId &
vbcrlf
MyString1 = MyString1 & "strInstallNR = " & strInstallNR & vbcrlf
MyString1 = MyString1 & "strMS_PrjTracking = " & strMS_PrjTracking
& vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strMS_PrjCostRefNo) = "
& ReplaceSingleQuote(strMS_PrjCostRefNo)& vbcrlf
MyString1 = MyString1 & "strPS_PrjTracking = " & strPS_PrjTracking
& vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strPS_PrjCostRefNo) = "
& ReplaceSingleQuote(strPS_PrjCostRefNo)& vbcrlf
MyString1 = MyString1 & "strPS_Manday = " & strPS_Manday & vbcrlf
MyString1 = MyString1 & "strIsMYMC = " & strIsMYMC & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strPaymentTerm) = " &
ReplaceSingleQuote(strPaymentTerm) & vbcrlf
MyString1 = MyString1 & "intRegionId = " & intRegionId & vbcrlf
MyString1 = MyString1 & "strBlendedAmt = " & strBlendedAmt &
vbcrlf
MyString1 = MyString1 & "strBlendedPct = " & strBlendedPct &
vbcrlf
MyString1 = MyString1 & "strBillCustType= " & strBillCustType &
vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strRefNo) = " &
ReplaceSingleQuote(strRefNo) & vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strDORemarks)& = " &
ReplaceSingleQuote(strDORemarks) & vbcrlf
MyString1 = MyString1 & "strAccMgrIDOut = " & strAccMgrIDOut &
vbcrlf
MyString1 = MyString1 & "ReplaceSingleQuote(strDOSOno)= " &
ReplaceSingleQuote(strDOSOno)& vbcrlf
MyString1 = MyString1 & "strCompanyIn= " & strCompanyIn& vbcrlf
MyString1 = MyString1 & "strMSAT = " & strMSAT & vbcrlf
MyString1 = MyString1 & "strCompany = " & strCompany & vbcrlf
MyString1 = MyString1 & "intCurrentVersion_DO= " &
intCurrentVersion_DO & vbcrlf
MyString1 = MyString1 & "strDuration = " & strDuration& vbcrlf
MyString1 = MyString1 & "strFastTrackClient = " &
strFastTrackClient & vbcrlf
MyString1 = MyString1 & "strExcpLMLList = " & strExcpLMLList &
vbcrlf
MyString1 = MyString1 & "strExcpLMLDO = " & strExcpLMLDO & vbcrlf
MyString1 = MyString1 & "strExcpLMLBID = " & strExcpLMLBID &
vbcrlf
MyString1 = MyString1 & "strExcpLMLGAM = " & strExcpLMLGAM &
vbcrlf
MyString1 = MyString1 & "strSQLHdr = " & strSQLHdr
MyFile = Server.MapPath("check\" & strfileName1)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set TSO = FSO.OpenTextFile(MyFile, ForWriting, Create)
TSO.write MyString1 & vbcrlf
' close TextStreamObject and
' destroy local variables to relase memory
TSO.close
Set TSO = Nothing
Set FSO = Nothing
 
B

Bob Barrows [MVP]

dear everyone..
i want to create one attachment which is trigerred once the user click
on "approve" button and each time user clicks, there will be one
attachment for that particular form.

before that, i need to let u know that, for case: "reject", i already
put below code. and it works fine. and now, after i put the code for
case: "approve", Http 500 error comes out.

First, tell us what the real error is:
http://www.aspfaq.com/show.asp?id=2109
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,962
Messages
2,570,134
Members
46,692
Latest member
JenniferTi

Latest Threads

Top