|
| |
|
|
SerenityNet
Posts: 1372 Joined: 6/12/2001 From: Allen, TX, USA Status: offline
|
Update DB with 2000+ characters - 2/6/2002 21:55:15
Hi, I have a DRW (on a diet) that contains hyperlinks with the following code on the ID value: NewsEditUpdate.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>&NewsDate=<%=FP_FieldURL(fp_rs,"NewsDate")%>&Name=<%=FP_FieldURL(fp_rs,"Name")%>&News=<%=FP_FieldURL(fp_rs,"News")%>&account=<%=FP_FieldURL(fp_rs,"account")%> This posts to a form on the next page that uses the code <%=request("NewsDate")%>, etc. in the form fields to display the current DB values. The user then updates the form field values as desired and when they press the submit button, then the DB is updated by posting the form data to the next page that contains a DRW with the following custom query: UPDATE tblNews SET NewsDate='::NewsDate::', News='::News::', Name='::Name::' WHERE ID= ::ID:: This is basic stuff and it all works wonderfully, unless the post is over approximately 2000 characters. (The NEWS field's value may be quite large.) At that point nothing happens. Is there a way that I can let a user recall to a form, view, then update a large DB record field? (I know I can just let them re-enter the DB record from scratch. I'm not limited to size using that method. But I would prefer to let them modify existing content, then submit the update.) Andrew webmaster@serenitynet.net - But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, and self-control..." Gal. 5:22
|
|
|
|
SerenityNet
Posts: 1372 Joined: 6/12/2001 From: Allen, TX, USA Status: offline
|
RE: Update DB with 2000+ characters - 2/6/2002 22:49:58
I'm open to that, but I'll need some help. I've only modified existing code. I have no idea how to write code to pull a current DB record field and the set it as a session variable. All I know how to do is get and display the session variable once it is set. Any help would be appreciated. Andrew webmaster@serenitynet.net - But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, and self-control..." Gal. 5:22
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Update DB with 2000+ characters - 2/7/2002 7:02:07
Unless there is a good reason not to, just pass the ID of the record NewsEditUpdate.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%> and then use the next page to populate the form with a database query of that ID. That way, you wont need to pass so much information between pages. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
SerenityNet
Posts: 1372 Joined: 6/12/2001 From: Allen, TX, USA Status: offline
|
RE: Update DB with 2000+ characters - 2/7/2002 9:58:24
I tried putting a skinny (on a diet) DRW into a form field, but it didn't work. If that is what you are suggesting then I either didn't do it right or I made a simple mistake I didn't catch. Should I try again just putting a DRW into a form field that uses the ID value? Or rather than the lengthy code the DRW produces (even on a diet), what would be the shortest code I could use that would open a DB connection, grab the data, and close the connection? Would you mind writing me a sample, or giving me direction to an example I could modify? Thanks again, Andrew webmaster@serenitynet.net - But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, and self-control..." Gal. 5:22
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Update DB with 2000+ characters - 2/7/2002 14:45:42
sSQL = "select * fro.... where ID="& request.querystring("id") sDSN = "Your Connection" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open sSQL, sDSN field1 = objRS("field1") field2 = objRS("field2") objRS.Close Set objRS = Nothing The value of your form boxes would be : <%=field1%> <%=field2%> etc Did I make it sound easy? :) §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
SerenityNet
Posts: 1372 Joined: 6/12/2001 From: Allen, TX, USA Status: offline
|
RE: Update DB with 2000+ characters - 2/7/2002 21:34:44
Thank you Spooky. You made it "sound" easy, but I won't get to try it until next week. However, if I have problems at that time - I know where to find you. Thanks again, Andrew webmaster@serenitynet.net - But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, and self-control..." Gal. 5:22
|
|
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
|
|
|