Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


upload+update

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,1498
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> upload+update
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 upload+update - 10/20/2004 3:42:36 PM   
  Yutaka

 

Posts: 5
Score: 0
Joined: 2/8/2003
From:
Status: offline
I got an error:
Error Type:
Request object, ASP 0208 (0x80004005)
Cannot use the generic Request collection after calling BinaryRead.

at this line:
set rs = conn.execute("update Project_Description set FlagStatus='" & request("pot") & "', Comments='" & request("reasons") & "', ProgressStage='" & request("projectstage") & "', ProgressStatus=" & request("progress") & " where ProjectID =" & request("projectid") & "")


I put the upload code and the update to database code together.
The upload code comes first then followed by my update to database code. And I got the file that I uploaded in my folder, but I see the above error message.

Please reply soon, thank you.
Yutaka
 
 
Post #: 1
 
 Re: upload+update - 3/3/2005 1:15:18 AM   
  VBS

 

Posts: 110
Score: 0
Joined: 3/2/2005
From: Lebanon
Status: offline
Dear Yutaka,
ur code has a big error, which is u used Request("") instead of Request.Form("") or Request.QueryString(""), but i recommend u to use this code instead of the SQL Statement, as in the example bellow: (if u want to stick with SQL Statement , i wrote the correct code under this code)
--------------------------------------------------------------
--begin code1--
conn.begintrans
Set rs = server.creatobject("ADODB.Recordset")
set rs.activeconnection = conn
conn.commitTrans
rs.open "SELECT * FROM Table_Name WHERE ProjectID =" & request("projectid") & "",conn,2,3

rs.addnew
rs.fields("FlagStatus")=request.form("pot")
rs.fields("Comments")=request.form("reasons")
rs.fields("ProgressStage")=request.form("projectstage")
rs.fields("ProgressStatus")=request.form("progress")
rs.update
--end code1--
-------------------------------------------------------------------

--start code2--

set rs = conn.execute("update Project_Description set FlagStatus='" & request.form("pot") & "', Comments='" & request.form("reasons") & "', ProgressStage='" & request.form("projectstage") & "', ProgressStatus=" & request.form("progress") & " where ProjectID =" & request.form("projectid") & "")

--end code2---


Don't Forget to post the result

Best Regards

Firas S Assaad

(in reply to Yutaka)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> upload+update Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts