Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Inserting info into a database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Inserting info into a database

 Post Reply Post Reply
Author
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Topic: Inserting info into a database
    Posted: 06 January 2004 at 3:37pm

ok, so i have a database, and i want to add information to it. But it keeps adding in a new record for me instead of inserting in information into the current records.

This is what i have to insert my records....

____

Rs("QtyFour") = Trim(Request.Form("qty"))

_______

so what do i have to add, in order for me to add information to current records???

thanks

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2004 at 3:47pm

you should delete the recordset.addnew line..

Back to Top
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2004 at 3:50pm

awesome..works great...i thought it would be way more complicated

thanks again

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2004 at 3:56pm
but now ure not able to add records if u used the same script for both adding and editing
Back to Top
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2004 at 3:56pm

ok i lied....its just inserting it on the first line/record of the database

i have about 25 records in my DB, and the RowID is being passed through all the pages. How do i link it so the record goes into the right RowID??

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2004 at 4:00pm

use this in your sql string

"SELECT * FROM table WHERE RowID = " & integersource

Back to Top
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2004 at 8:27am

ok...so excuse my stupidity...but...for this...

"SELECT * FROM table WHERE RowID = " & integersource

would i just write integersource...or would i write one of my variable names??

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2004 at 9:13am
You would replace integersource with whatever variable you have your integer in
Back to Top
 Post Reply Post Reply

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.