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)
 ID number issue
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

The Omega
New Member

55 Posts

Posted - 02 September 2003 :  14:56:15  Show Profile
I am developing a dispatch system on the side for the company I work for. I am running into problems when I am trying to edit or add records as it cannot pull the ID number on it.

Edit/Insert Text
http://www.omegaprotocol.net/ablexprs/editdispatch.txt

code lines in display:

<a href="<%=("editdispatch.asp?DispatchID=" & DispatchID & "&Action=Edit")%>">Edit</a>

Edited by - The Omega on 02 September 2003 14:57:19

dayve
Forum Moderator

USA
5820 Posts

Posted - 02 September 2003 :  23:19:17  Show Profile  Visit dayve's Homepage
That line is totally out of whack... you're best to Response.Write it out like this:

Response.Write ("<a href=""editdispatch.asp?DispatchID=" & DispatchID & "&Action=Edit"">Edit</a>")

Go to Top of Page

The Omega
New Member

55 Posts

Posted - 03 September 2003 :  17:32:08  Show Profile
The id is still not being retrieved.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 03 September 2003 :  17:37:19  Show Profile
Do you see a value for DispatchID in the address bar when you goto the editdispatch page? try putting a response.write DispatchID right after grabbing it from the querystring to see if the value is being set.

Can you give us a test link to the actual page so we can see what the output is?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

The Omega
New Member

55 Posts

Posted - 03 September 2003 :  19:11:12  Show Profile
http://www.omegaprotocol.net/ablexprs/default2.asp

http://www.omegaprotocol.net/ablexprs/editdispatch.asp

The layout is far from finished of course....
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 03 September 2003 :  19:37:34  Show Profile
your problem is in the default page. what is the code for that page?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

The Omega
New Member

55 Posts

Posted - 04 September 2003 :  02:50:37  Show Profile
http://www.omegaprotocol.net/ablexprs/default2.txt
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 04 September 2003 :  07:58:49  Show Profile
You are not setting DispatchID on that page. You need to do that. I assume it is a recordset value, so in the first line of the loop you will need to do something like:

DispatchID = Recordset1("DispatchID")

or whatever the name of the field is in your recordset.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 04 September 2003 :  10:24:25  Show Profile  Visit dayve's Homepage
Nikkol is right on the money... no where in your code have you set the argument DispatchID to any value. The best way to do it is Nikkol's way, but an alternate solution would be this as well:

Response.Write ("<a href=""editdispatch.asp?DispatchID=" & Recordset1("DispatchID") & "&Action=Edit"">Edit</a>")


Looks like someone is using Dreamweaver too . It is so easy to identify DW's libary of code.




Edited by - dayve on 04 September 2003 10:25:49
Go to Top of Page

The Omega
New Member

55 Posts

Posted - 04 September 2003 :  11:36:37  Show Profile
i tried to write a loop but never could get it to work. i think my connstring was messed up on it... thanks for the help...
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 04 September 2003 :  12:06:20  Show Profile
huh? you have written a loop on that page and it seems to be working, you just haven't set the value for DispatchID.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

The Omega
New Member

55 Posts

Posted - 04 September 2003 :  18:06:27  Show Profile
I got that fixed... I had hand wrote a loop and it did not work thats why i am using the dw code.... also can someone look at the sql update statement as it has a syntax error...
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.42 seconds. Powered By: Snitz Forums 2000 Version 3.4.07