Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Changing Steps Order
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

PuppyF500
New Member

Netherlands
68 Posts

Posted - 10 January 2005 :  14:10:34  Show Profile
I'm trying to create a Tutorial Page. I coded all the stuff except for one page. The page is supposed to change the order of the steps in Tut_ID x (where x is being fetched using Request.QueryString). Because the database doesn't allow duplicate entries I tried to first update the database with a value +10 and then revert that but then put the correct value in the database field. (still following me? ) I managed to make a system for the value +10 action. and it also reverts it after doing the first update, but whatever I try it won't update the number I want it to update

The database looks like this:

The things in bold are Primary Keys

And of course here the code from the step_order.asp page.
step_order.asp

If you are going to test the page, you'd probably need the Database itself too.
Tutorials.mdb

Edited by - PuppyF500 on 10 January 2005 14:12:25

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 10 January 2005 :  14:17:55  Show Profile  Visit D3mon's Homepage
do you have step_nr set as a primary key (in the Steps table)?


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 10 January 2005 :  14:24:07  Show Profile
Step_nr and Tut_ID are the Primary Key, otherwise i can't create 2 steps 1 (needed if i want more than one Tutorial)
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 10 January 2005 :  14:36:02  Show Profile  Visit D3mon's Homepage
I don't think you'll be able to change the value of a primary key column, especially if its auto-generated.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 10 January 2005 :  14:37:39  Show Profile
its not auto-generated, and it can be changed, i can let it change to value + 10 without problems, but inserting the correct nr after that fails. it just insert the old number again... it's probably a stupid mistake i'm making, but if someone could find out what it was i would be very happy with it

Edited by - PuppyF500 on 11 January 2005 01:52:36
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 12 January 2005 :  18:58:19  Show Profile
anyone who can help me out?
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 12 January 2005 :  22:39:04  Show Profile
Do you get errors?

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 13 January 2005 :  04:26:13  Show Profile
I don't get any errors, but first it updates values of +10 (which is correct) but then it has to insert values from the form into the database, but it just inserts the old values back in. But i can't find the problem
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 13 January 2005 :  12:22:46  Show Profile
i did it it works now i made a small mistake, i forgot to let the page remember the new step_nr correctly so it went wrong while updating the 2nd time tnx for trying to help anywayz
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07