Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Asp question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Asp question

 Post Reply Post Reply Page  <12
Author
rleffew View Drop Down
Newbie
Newbie


Joined: 28 January 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rleffew Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 2:06pm
That is how I had it before.  It works that way. The problem is when I go the Quote Detail page (quotedetail.asp) I have on that page a form for them to fill out any notes for that quote and update it to a database.  All this worked fine. 

I use the form submit button which takes you to a page (QuoteNoteAdd.asp) that does the actual database addition of the note. 

From that page when I go back to the QuoteDetail page I loose the quereystring.  Is there a way to reset the query string in QuoteAddNote.asp so I can get back into qoutedetail.asp.  This is why I thought of using session.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 3:25pm
to get the querystring value just use request.querystring("stringName")..

if the value is / sent though the string it will be able to be collected
Back to Top
rleffew View Drop Down
Newbie
Newbie


Joined: 28 January 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rleffew Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 3:34pm
Thanks that did it.  I appreciate it very much.  Do you know how to populate a  form text box  after reading  a datebase.

Last think  I need to know.  You have been very helpful.

Thanks again.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 4:27pm
one way is to set a veriable with the value

like strdatabasevalue = connection("table filed name")

connection is the same as the one stated on the .open line


then use <%= strdatabasevale %. to show the database value
Back to Top
rleffew View Drop Down
Newbie
Newbie


Joined: 28 January 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rleffew Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2005 at 4:46pm
I have a form called form1 with 2 textboxes.

I do the following code:

    DBPath = Server.MapPath("/database/cejco.mdb")
   
    Set MyConn = Server.CreateObject("ADODB.Connection")
    Set MyNS = Server.CreateObject("ADODB.Recordset")
    MyConn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & DBPath 
    SQL = "SELECT * From QuoteDailyNote Where QuoteDailyAuto = " & quoteAutoID
    'open main rs for populating participant page
    MyNS.Open SQL, MyConn, adOpenKeySet, adLockPessimistic, adCmdText   

If MyNs.Recordcount > 0 Then
   
    MyNS.MoveFirst
    Do While Not MyNS.EOF
        Session("QuoDlyAutoID") = quoteAutoID
        x = MyNS.Fields("QuoteDailyHeader")
        document.form1.txtNoteDB.value = myNS.Fields("QuoteDailyNote")

I am assuming the last line (document.form...) is incorrect.
I am not sure what you were saying.

Thanks,

Bob

%>
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 06 February 2005 at 9:21pm
You can't do it like that unfortunatly.  Put the value you want to load into the textbox in a variable like:

strValueFromDB = myNS.Fields("QuoteDailyNote")

Then go to where the textbox (or whatever) is and put:

<input type="text" value="<%=strValueFromDB %>">
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.