By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

ASP Page Error

P: 1
Hi,
I have an ASP page with 3 fields.in the form action i am calling another page to insert the 3 values to the database. when i tried to display the query the the value of the fields were empty.
i am pasting the code snippet down. please help me,how to solve this issue.
Expand|Select|Wrap|Line Numbers
  1. Set l_Con = ConnectDb()
  2.  
  3. Session("fileid") = GenerateUniqueFileID 
  4. l_FolderPath =   Request.ServerVariables("APPL_PHYSICAL_PATH") & "data\PressReleases"
  5.  
  6. Set Uploader = New FileUploader
  7. Uploader.Upload()    
  8.  
  9. l_desc=replace(Uploader.form("desc"),"'","''")
  10. l_date=replace(Uploader.form("demo"),"'","''")    
  11.  
  12. For Each File In Uploader.Files.Items
  13.      File.SaveToDisk l_FolderPath
  14.      fname= File.fileName    
  15. Next
  16.  
  17. Set l_Rs =Server.CreateObject("Adodb.Recordset")
  18.  
  19. l_strSql = "Insert Into Marketing_pressReleases([Desc],FileName,PDF_Date) values ('"& l_desc &"','"& fname &"','"& l_date &"') "
  20.  
  21. Response.Write(l_strSql)
  22. l_Rs.Open l_strSql,l_con
  23.  
  24. Set l_Rs=nothing
  25.  
  26. If err.number > 0 then        
  27. Response.Redirect("../errpage.asp?errtype=1")
  28. End if

When I tried to see the values in the response.write I got the result as
"Insert Into Marketing_pressReleases([Desc],FileName,PDF_Date) values ('','','') "
ALl the fields were empty.
the worst part is the same piece of code works well in other pages of my application. please help me!!!
Jun 30 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.