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
- Set l_Con = ConnectDb()
- Session("fileid") = GenerateUniqueFileID
- l_FolderPath = Request.ServerVariables("APPL_PHYSICAL_PATH") & "data\PressReleases"
- Set Uploader = New FileUploader
- Uploader.Upload()
- l_desc=replace(Uploader.form("desc"),"'","''")
- l_date=replace(Uploader.form("demo"),"'","''")
- For Each File In Uploader.Files.Items
- File.SaveToDisk l_FolderPath
- fname= File.fileName
- Next
- Set l_Rs =Server.CreateObject("Adodb.Recordset")
- l_strSql = "Insert Into Marketing_pressReleases([Desc],FileName,PDF_Date) values ('"& l_desc &"','"& fname &"','"& l_date &"') "
- Response.Write(l_strSql)
- l_Rs.Open l_strSql,l_con
- Set l_Rs=nothing
- If err.number > 0 then
- Response.Redirect("../errpage.asp?errtype=1")
- 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!!!