Looping Through Categories In Recordsets
I have a list in a database that I have categorised using a category field. I now want to retrieve all records but grouped by categories. how do i get my asp to loop through each category creating a recordset for each one rather than hard code a new recordset for each category i would rather it did it dynamically if thats possible ??? Code:
View Replies
ADVERTISEMENT
i want to have a search program that has multiple categories.
anybody can give a sample?
View Replies
View Related
I am using MS Access & open 3 table, 1 for Product 1 for Genre, 1 more for Product_Genre (because one product maybe have many categories)
But when I have tried many ways to delete one of categories, also fail to do it.
What I want to do is : When delete a category,
1) it must delete the Product which is under the Category (to be delete)
2) at the same time it must also delete the records from table 'Product_Genre' which is related with the Category (to be deleted)Code:
View Replies
View Related
i am working on ecommerce site and would like to display the categories (and sub categories) from the db recursively,
i did it but i also want to add the level of each category like :
main_cat_1 (level 1)
--------sub_1 (level 1_1)
--------sub_2 (level 1_2)
------------sub_sub_2 (level 1_2_1)
------------sub_sub_2 (level 1_2_2)
------------sub_sub_2 (level 1_2_3)
--------sub_3 (level 1_3)
main_cat_2 (level 2)
main_cat_3 (level 3)
--------sub_3 (level 3_1)
and so on ... how can i do that ?
View Replies
View Related
im developing a Product configurator (just like alienware use) where in my database i have
(systems table) a list of PC systems
systemID
(categories table) a list of PC product categories (ie. CPU, RAM...)
categoryID
(products table) a list of all products
productID, catID
(link table)
sysID and prodID
Now before i put the code ive done so far, let me explain that the first page lists all systems wich then gives the systemID for the link table. Once this page loads it needs to go through each category then list the products available to that category where sysID = systemID. Now a query i put together to list all products for that sysID is:
select * from PRODUCTS inner join link on link.prodID = PRODUCTS.productID where link.sysID=systemID
Now this query works great and lists all of the products for that systemID, but what im unable to do is (using GetRows()) have the category name listed as a title then have each product under the respected category. Code:
View Replies
View Related
I've got a products table and a productCategories table related by a categoryID field. The categories table uses autonumber for the categoryID and I've got about 4 or 5 different categories in there right now.
I'm creating an Add Product page now and I'd like to create a drop down menu with which to select the correct category. How do I make it so that my drop down menu actually shows the category names and then populates my tables accordingly?
I won't need to ever add a new category here, simply use the current categories in a drop down so I don't have to guess/remember which number is which category.
View Replies
View Related
I want to put my existing review books webpage in Asp/Database because I have more than 5000 of them and its now too complicated to keep tracks of it all in HTML only. My database is ready, I know how to connect to it, how to list records and how to select in them, I know how to pass a variable from a page to another, I know how to add, modify and delete records... yeah its about that so far.
Here is how I want my website to look like. I want to have physical pages categories, like all the science fiction books should be listed in sf pages separated alphabetically Ex reviews of Lord of the ring will be in sciencefictionT.asp and so on for each categories. I want too that a page with all the reviews listed linking to the right place. In my database I have already categories for each books.So is it possible to do or I complicate my life too much?
I know that it would be much more easier just to make a review.asp and have the review one at the time there, but I like the way my website is already is, that make it different from others.
View Replies
View Related
I have a default catalogue/product page (code shown below list_item.asp) which list all the products from the database. But since I have lots of category in the catalog/product page, i want to separate them according to their respective categories like writing instruments, desktops, pantry etc.
This will enable the user to go to a respective page and choose the individual product from the respective categories. If I adjust the SQL statement to be "SELECT * from Product " WHERE category LIKE 'DESKTOPS', this page will lists all the items from that category selection. But if i were to make another page such as pen.asp and adjust the SQL statement to category LIKE 'PEN'.
The first page lists the products from the pen category and the following page unfortunately shows category from Desktops. how to segragate these categories so that it will only show the products from the individual categories.
View Replies
View Related
I have created a dropdown menu that allows users to navigate and load other pages into a different frame (detail) than the one in which the dropdown is sited. All menu items and urls are stored in an access db.
Now I would like to try and make 2 improvements but I don't know how:
1. I would like to use the [Category] field in my data set to produce (non-clickable) headings in the drop down list. Code:
View Replies
View Related
I'm trying to create a site map that will display links to all pages including links to bring the visitor to different categories. See below:
Home:
About us:
Products:
-Category 1:
-Category 2:
-Category 3:
-Category 4:
Contact us:
When the visitor clicks on 'Category 3' they should be sent to a page that displays all the products in Category 3. Code:
View Replies
View Related
im looking for an asp (not .net) script based on a user forum
where as the admin i can set up different users to only see related
forum topics (i want to use it for project management) uploading files
to the forum would also be a massive advantage!!!
View Replies
View Related
I have a database with many fields. One of this field is of type memo
which contains some bullet points seperated by # sign (something along
those lines). What I have is this code which gives me a table with one
row and as many columns in the split array. Code:
View Replies
View Related
I am trying to loop through my database to display a picture. That is no problem. Where I hit a snag is this. I only want three pictures then break to a new row and three more, etc. Any ideas? What this does is display one record. Code:
View Replies
View Related
Is it possable to exit a loop in asp.
View Replies
View Related
i got a problem regarding abt several looping running at the same time. I wanted the 1st loop to run once and then the 2nd loop to start running after the 1st loop ran once.. but the coding I do doesn't seem to be able to do that. Can sum1 teach mi how to do it?
The coding:
View Replies
View Related
I am working on an asp page that goes to a rs to get data. I need to run a loop that pulls the data line by line until it is at the end of the database. I could do an Until loop, but I don't know how many records are in the recordset. So I suppose it should be a do until end-of-file?
View Replies
View Related
In my arrary ListSong(), I have song names like (Song1.mp3,Song2.mp3,Song3.mp3,.....).
If the user selects more than one song, it should play one after the other. I want to do some looping for the <embed> tag. Here is my code:
<EMBED SRC="Songs/<%=ListSong(0)%>.mp3" VOLUME="50" AUTOSTART="true" HEIGHT="80" WIDTH="415">
View Replies
View Related
is there anyway to do a loop with an sql command in? Ive created a message board type of thing but its got the option to delete unwanted messages. next to each message there is a lil checkbox with the Record ID for the message as the name tag, what im trying to do is when a user clicks say 3 messages to remove it puts the id's of the checkbox's clicked into a query string or something and then loops deleting the messages in the database.sorta works like this
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("databases/conkers.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
messages = request.QueryString("ids")
for each value in messages do
mySQL = "DELETE FROM messages WHERE ID = '" &messages & "'"
Set RS = myConn.Execute(mySQL)
loop
View Replies
View Related
I have a recordset which writes out a table. As it is constructed now it loops through and repeats every record, but i want the last two rows to only appear once, but when I try to move the rsProd.MoveNext to where I want the loop to stop I get an error msg saying:
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. Code:
View Replies
View Related
I have a folder with about 40 swf training movies.
I want to loop through the folder and display the titles of the movies and make them links.I just need help getting pointed in the right direction to make this happen.
View Replies
View Related
I've got an Array that has split a text field in an Access DB. This Array is now: Array(0) = 1 and Array(1) = 3.
I have another field in another table that has a number and then the name associated with that number.I am wanting to display the name associated with 1 and 3 from my DB but a Do Loop isn't working. I presume because after it displays Array(0) (which it does well) the Looping condition is no longer true because there is no "2" in my array, it skips to 3. So Array(0) works because its true, but then it stops because there is no two but does not pick back up with Array(1).
View Replies
View Related
I am working on creating reports from an access database. I am trying to populate a table created from the one-to-many relationships in the database. In one column a name appears more than once because it is related to multiple records.
When I display this information I would like to only show the name once in one column but show all of the records it is related to in another.
I have attached a spreadsheet the better explains what I am trying to do. The report is written asp and I have been using loops to write the data to the report. I have also attached the code I am using. The report uses values that the user selects from a map. Then it selects the same values in the database.
View Replies
View Related
I need to look at each element in an array to write it to the web page, one element at a time. The previous page contained a form of dynamically created checkbox sets. The number of checkbox sets will always be unknown. Anyway, here's my question:
I've tried different code (due to circumstances that would be to lengthy to get into here, I need to use vbscript, be able to use javascript within vbscript code.
Here are examples I've tried and the results: Code:
View Replies
View Related
I'm currently having some major problems with an insert form that I created
Basically, if a large amount of information is being inserted into the database I get an error
This seems to be a restriction imposed by the host
What I would ideally like to be able to do is to grab so many characters from the textarea insert this into the database and loop this until everything has been inserted (the information would all need to be inserted into the same field of a record)
I've never tried this before so would appreciate any advice/tips on how to go about doing this
View Replies
View Related
I am trying to play multiple songs (as per the user selection) by using <embed> tag.
What is the loop condition I need to use to play the songs one by one. Ex:
<%
ListSong = (Song1.mp3,Song2.mp3) //(Array values differs)
For i = 0 to Ubound(ListSong)
<EMBED SRC="Songs/<%=ListSong(i)%>.mp3" VOLUME="50" AUTOSTART="true" HEIGHT="80" WIDTH="415">
Next
%>
But here the problem is: it's playing the last song in the array. But I need to play first Song1.mp3 and then Song2.mp3
View Replies
View Related
I would like to split a recordset into two parts.
For example, in a left hand column I would to display upto the first 10 records and in the right hand column the next 10 records etc.
I would like this to work even if there are only 3/4 records in total (ie. Less than 10) - so the page would display the first 3/4 records in the left hand column and nothing in the right.
I would like to do this without the use of paging if poss as it needs to be pretty simple!
View Replies
View Related
i have a variable in a database that is looping that outputs numbers like:
1. 45
2. 34
3. 94
4. 34
But are all in the same variable:
DoDateTime((rsBoxEdit.Fields.Item("").Value), 3, 2057)
How can i make it so that it loops that variable and adds the numbers up and outputs 1 variable called total or something?
View Replies
View Related
Im using the code below to create a calendar. The problem is when it comes to checking how many bookings have been taking on that day and colors it accordingly it doesnt go past the first day.
So say I have a booking on 1/1/2004 it will color it accordingly but wont color any of the rest of the days that have them on as well. Code:
View Replies
View Related
I want somethingh like hotmail, where I don't know the exact amount of records displayed, but when the users checks the boxes and presses submit I can detect which boxes were checked and be able to perform the operation.
View Replies
View Related
Normally I do a query, and loop through the records. Is there a way to loop through the columns of each record?
View Replies
View Related
I have a variable that goes through a loop, and each time it appends the new value to the end using a comma. Example:
1st time through:
a = 1
2nd time through:
a = 1, 4
3rd time through:
a = 1, 4, 2
So now after my loop is all done I have this value where each value is seperated by a comma. What I want to do is compare each of the values and display only the largest number. Any ideas on how to do this?
View Replies
View Related
I'm have some trouble looping to the end of all the items that i split apart by a comma....mainly just displaying all the items in the string. Code:
set RS2Name001 = MyConn.Execute ("Select * from tblCustomers where UserName = '" & Request.Cookies("User")("strUserName") & "'")
rs22 = Split(RS2Name001("RS2Name"), ",")
bbb = RS2Name001("RS2Name")
For Each bbb in rs22
Response.Write rs22(x)
Response.Write "<br>"
next
Response.End
View Replies
View Related
i have a jscript that accepts parameters/arguments, how do you loop thru the arguments?
i = 0;
while (!i == oArgs.length ) {
WScript.Echo[oArgs(i)];
i = i + 1;
}
this does not even get inside the loop.
View Replies
View Related