Forums

This topic is locked

Jumpmenu to get records out of database

Posted 30 Dec 2001 23:11:19
1
has voted
30 Dec 2001 23:11:19 Igor B posted:
I want to use the DW jumpmenu to get records from my database.

Jumpmenu contains:
- rave
- trance
- hardtrance

The recordset (rsResults) has the following:
- from .MDB colums: Product, Description and Price.
- The SQL coding (in advanced settings in UD):
SELECT *
FROM Products
WHERE ProductGroup= 'hardtrance'
ORDER BY Product ASC

This SQL is all I have at this moment. It is just static now and not good for what I want to do with the jumpmenu. I has to contain a variable to 'communicate' with the SQL. I think this has to do with "WHERE Artikel= 'hardtrance'".
That 'hardtrance' has to be replaced by a variable but I just don't know with what variable and how to change the value (or other) settings from the jumpmenu.

So please help me if possible. Thanx.




Edited by - ornathon on 30 Dec 2001 23:20:03

Replies

Replied 31 Dec 2001 07:08:25
31 Dec 2001 07:08:25 Owen Eastwick replied:
Something like:

If Request("JumpMenuName" <> "" Then
varProductGroup = Request("JumpMenuName"
Else
varProductGroup = "%"

then

YourRecordsetName.Source = "SELECT * FROM Products WHERE ProductGroup= '" & varProductGroup & "'
ORDER BY Product ASC"

Take a look at the link below for more ideas.

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 31 Dec 2001 12:07:12
31 Dec 2001 12:07:12 Igor B replied:
thanx! I will check it out

Replied 31 Dec 2001 20:20:46
31 Dec 2001 20:20:46 Igor B replied:
Hi again....it didn't work out so wel. I have used a bit of your code. This is how is looks now:

If Request ("NameJumpmenu" <> ""
Then varArtikel = Request("NameJumpmenu"
Else varArtikel = "null"
End If
rsResults.Source = "SELECT * FROM Products WHERE Artikel= "& Artikel &" ORDER BY Omschrijving ASC"

Still it isn't working. Maybe it has to do with the jumpmenu code:

<form name="componenten" method="post" action="">
<select onChange="MM_jumpMenu('parent',this,0)" name="componenten">
<option value="#" selected>Componenten</option>
<option>rave</option>
<option>trance</option>
<option>hardtrance</option>

So now I'm stuck again <lol> All suggestions are more than welcome


Replied 02 Jan 2002 00:23:15
02 Jan 2002 00:23:15 Owen Eastwick replied:
This isn't the complete code you will need:
-------------------------------------------------------------------------------
If Request ("NameJumpmenu" <> ""
Then varArtikel = Request("NameJumpmenu"
Else varArtikel = "null"
End If
rsResults.Source = "SELECT * FROM Products WHERE Artikel= "& Artikel &" ORDER BY Omschrijving ASC"
-------------------------------------------------------------------------------
You will need the whole code for the recordset, use Data Bidndings > Recordset(Query):

You will need to modify the jump menu, something like:

<form name="componenten" method="post" action="">
<select onChange="MM_jumpMenu('parent',this,0)" name="componenten">
<option value="%" selected>Componenten</option>
<option value="rave">rave</option>
<option value="trance">trance</option>
<option value="hardtrance">hardtrance</option>


Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo

Edited by - oeastwick on 02 Jan 2002 00:26:57
Replied 02 Jan 2002 21:19:16
02 Jan 2002 21:19:16 Igor B replied:
suck bigtime in UltraDev. I have modified the jumpmenu how you said to do:

<form name="componenten" method="post" action="">
<select onChange="MM_jumpMenu('parent',this,0)" name="componenten">
<option value="%" selected>Componenten</option>
<option value="rave">rave</option>
<option value="trance">trance</option>
<option value="hardtrance">hardtrance</option>

But what do I have to do with the ASP to let it recognize the jumpmenu. Btw, what do you mean with "whole code for the recordset". That I have to make the code in Recordset(query)?
Again, thanx for your help. I tried your tutorial and it rules. Though I couldn't combine it to make my jumpmenu-thing work <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Maybe it is important to know that the jumpmenu is on the same page as the resultpage. I've used other examples, but all this will be used on this site: www.bluestorm.nl/componenten/behuizing.html
There are 2 seperate jumpmenu's. The text on the right (content) has to come from the database.
Dropdownbox 1 (components): selArtikel
Table:
- ArtikelNr (the recordID)
- Artikel (not shown on page, only used as search criteria..these are used in dropdownmenu)
- Omschrijving (description like CPU 1400Mhz)
- Prijs (the price)

Ah man....what problems. LOL!




Edited by - ornathon on 02 Jan 2002 22:25:06
Replied 03 Jan 2002 02:34:27
03 Jan 2002 02:34:27 Owen Eastwick replied:
I had a look into this further and it appears you can't use a jump menu to do this.

However I have worked out a solution that will give the result you want. I've created a page that will work with the Database in the UD4 Access Tutorial, so if you've dowloaded and installed that you should be able to unzip this file in the same directory and get the page working locally or just take a look at the code.

You can see the page working here:
www.tdsf.co.uk/tdsfdemo/JumpDemo.asp

You can download the zipped page here:
www.tdsf.co.uk/tdsfdemo/JumpDemo.zip

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 04 Jan 2002 15:25:05
04 Jan 2002 15:25:05 Igor B replied:
thanx!!!! I appreciate your help <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Wow! did you handcode this? Much ASP coding. This demo almost needs a tutorial to see what's going on LOL!




Edited by - ornathon on 04 Jan 2002 15:59:01
Replied 05 Jan 2002 03:32:19
05 Jan 2002 03:32:19 Igor B replied:
Okay it is working! Thanx again. I think it would be a great add-on for your advanced search tutorial <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I see that on your site: www.tdsf.co.uk/tdsfdemo/JumpDemo.asp
you can see directly all artists, without searching. Is it possible to let the screen be empty and let the records ONLY appear after you use the jumplink?
I tried to insert a new word in the jumpmenu and changed the value to NULL and #, but thit trick doesn't work on this one.
<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>



Edited by - ornathon on 05 Jan 2002 03:33:29
Replied 01 Apr 2008 11:16:06
01 Apr 2008 11:16:06 alice xiao replied:
when i used the demo sample on my own computer
i always got the error of
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

how come? and the error was caused by Recordset1_cmd.ActiveConnection = MM_testconn_STRING...

Reply to this topic