Forums

This topic is locked

Using Records Multiple Times in 1 Page

Posted 22 Mar 2002 18:16:18
1
has voted
22 Mar 2002 18:16:18 Aegis Kleais posted:
Hello all. This is my first time post on these forums, but I have been using DWUD4 for quite some time. Macromedia has indeed gone above and beyond and created a FANTASTIC website development tool! However, I have some questions.

Suppose I connect to an Access Database that uses a Local DSN setup through my IIS server. I can connect to, update, insert and delete just fine, but suppose there's a table called tblUsers, and a field called fldSSN (for social security numbers)

If I goto a place in my website and press "BIND" it inserts the value of fldSSN to the location the cursor is at. This is what I want. However, I go somewhere else in the page and Bind that field to another location. Save and move the page to the server and then view it, and only 1 of the binds will ever work at a time.

So how do I get it where I can use 1 field multiple times on a webpage?

My thanks in advance.

Replies

Replied 23 Mar 2002 01:43:13
23 Mar 2002 01:43:13 Dennis van Galen replied:
That's strange, can you try this again ?
it works great for me, dennisvg.homeip.net/MySite/Music/Untitled-2.asp
i just made new page, query, binded in the title, the firstReleased, the lyrics and the title 2 more times, works fine as it always did. it created this code for me:

<body bgcolor="#FFFFFF" text="#000000">
<p><%=(Recordset1.Fields.Item("SongTitle".Value)%> </p>
<p><%=(Recordset1.Fields.Item("FirstReleased".Value)%> </p>
<p><%=(Recordset1.Fields.Item("Lyrics".Value)%></p>
<p><%=(Recordset1.Fields.Item("SongTitle".Value)%></p>
<p><%=(Recordset1.Fields.Item("SongTitle".Value)%></p>
</body>

along with the headcodes for the query.

With kind regards,

Dennis van Galen
Webmaster KPN Services
Financial and Information Services
Replied 23 Mar 2002 03:29:24
23 Mar 2002 03:29:24 Aegis Kleais replied:
Thanks for your help.

But I'm still having the problem.

Let me explain this in full.

Upon going to page www.page.com/file.asp?id=2?lock=123123123123

I have UD4 Not Only CREATE A RECORDSET to something of the effect of:

SELECT * FROM DSNConnection WHERE id = MMColParam AND lock = MMColParam2
(MMColParam = id pulled from URL and MMColParam2 = lock pulled from URL)

Testing the connection works fine.

But I also make LINKS on the page. In this case it's a place where they can do many things such as:

PLACE AN ORDER (order.asp)
TRACK AN ORDER (track.asp)

But I have it create links to each one of those dynamically.

order.asp (then I click PARAMETERS and I make 1 value called "id" and dynamically set it to "id" from the Recordset.)
(then I add another value called "lock" and dynamically set it's value to "lock" from the database.)

So now I assume the dynamic link made is:

order.asp?id=1?lock=123123

And it is. Ok, that's good. So I continue to do the same with the track.asp link

But when I upload it and look at it's link, I see:

track.asp?id=?lock=

I look at the code, and BOTH of them say:

id=<%=(DSNConnection.Fields.Item("id".Value)%> and
lock=<%=(DSNConnection.Fields.Item("lock".Value)%>

It works for the first dynamic link, but not any residual ones. 8<img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
Any help on that?

Replied 23 Mar 2002 03:48:09
23 Mar 2002 03:48:09 Owen Eastwick replied:
Try it like this:

order.asp?id=&lt;%= (DSNConnection.Fields.Item("id".Value)%&gt;&lock=&lt;%=(DSNConnection.Fields.Item("lock".Value)%&gt;

track.asp?id=&lt;%= (DSNConnection.Fields.Item("id".Value)%&gt;&lock=&lt;%=(DSNConnection.Fields.Item("lock".Value)%&gt;

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 23 Mar 2002 05:21:19
23 Mar 2002 05:21:19 Aegis Kleais replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Try it like this:

order.asp?id=&lt;%= (DSNConnection.Fields.Item("id".Value)%&gt;&lock=&lt;%=(DSNConnection.Fields.Item("lock".Value)%&gt;

track.asp?id=&lt;%= (DSNConnection.Fields.Item("id".Value)%&gt;&lock=&lt;%=(DSNConnection.Fields.Item("lock".Value)%&gt;

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

That is EXACTLY what I have. ANd still, only the first referncing those fields has the link come out right.
The others are left with order.asp?id=&lock= for a link. Makes no sense to me... I thought it was a UD4 limitation.
Replied 23 Mar 2002 19:44:15
23 Mar 2002 19:44:15 Aegis Kleais replied:
I think I found a way around my problem.

Sure I would have liked to found the reason why others can do it and I can't, but what cha gonna do?

Anyways, I setup 2 REQUEST Data Sources that queried the URL for the ID and the LOCK value. When I went to build the dynamic links, instead of pointing to the Recordset I made (that was created from polling the URL as well), I pointed it to the REQUEST variables. Lo and Behold, it worked!

So now the link code is:

invoice.asp?id=&lt;%= Request("id" %&gt;&elk=&lt;%= Request("lock" %&gt;

Tada! 8

Edited by - Aegis Kleais on 23 Mar 2002 19:45:02

Reply to this topic