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:
I recently stumbled across a great company with wonderful products for easy integration within ASP pages. I've even created a community forum to support the products on my site.
I have a problem with adding and deleting the categories that a product is added to within a shopping cart administration system. My tables are designed as follows:
Table: Products Uid: autonumber Name: text etc
Table: ProductCategory Uid: autonumber ProductID: number CategoryID: number
Table: Category Uid: number Name: text Etc
When I add a product to the database I also add the same product to different categories i.e. I insert product info into Products and the product unique ID into the ProductCatgory table, which links to the Category table. The ProductCatgory is the table that links both the Products and the Category table together when I construct queries. This all works fine and I am able to add a product to multiple categories and then display the categories/product accordingly in the actual shopping cart. Code:
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:
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:
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)
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.
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.
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.
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:
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!!!
I'm using getRows in two different SELECT stataments and want to know if it's possible to place the data in the two getRows into one array? Lets's say I have something like this:
Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "Select test FROM Table WHERE id = "&id&"" rs.Open strSQL, Conn contentFirst = rs.GetRows
Set rs2 = Server.CreateObject("ADODB.Recordset") strSQL2 = "Select id FROM Table WHERE id = "&id2&"" rs2.Open strSQL2, Conn contentSecond = rs2.GetRows
Now what I want is a variable that holds the content of contentFirst and contentSecond like this: content = contentFirst + contentSecond
I was reading a sample on ASP101 (i love them), and it was, I think, saying u could specify the record u want to start at...is that true? If so, I think EVERYONE should use it...it would be very cool.
Because, if u need the 6th record, u can just get it, but, using a recordset, it would be, i believe, impossible...right?, or is that wat bookmarks are for?
I tried to get the data in array by using getrows. Data will be display in the drop down list in the future. i call a function to get the data. It should be return 8 rows of the data. But it return 0 row of data ....
I'm using getrows to return the values from two columns in a MSSQL sql
database. Looping through them like so: dim irowloop, icolloop, i for irowloop = 0 to ubound(instances, 2) for icolloop = 0 to ubound(instances, 1) response.write("<option value=""VAL"">") 'get 2nd col val response.write(i(icolloop, irowloop)) response.write("</option>") next next
How can I get the value of the second column into the VALUE=""attribute in the drop down?
Since I never user .GetRow, (because arrays drive me crazy) I thought I'd give it a shot with something I had to do, unfortunately I get several errors. Code:
I built a recursive forum (tree) with ASP (VBS) and getRows and the DB Microsoft Access. When I tried to add a pages division (with ADO) it destroyed everything The relevant code:
The ADO pages devision:
rs.PageSize = MessagesNum rs.CacheSize = MessagesNum If Not rs.EOF Then PagesCount = rs.PageCount rs.AbsolutePage = Page arr = rs.getRows End If
dim app_ids, irowloop, icolloop app_ids = get_app_logins(session("stremail")) for irowloop = 0 to ubound(app_ids, 2) for icolloop = 0 to ubound(app_ids, 1) response.write(app_ids(icolloop, irowloop) & ",") next 'icolloop response.write("|") next 'irowloop
That returns:
0,0,bobsmith,pAssWord,|0,71,tom,tom,|0,71,tomf,pAs sWord,|1,5,tom,a1,| Is it possible to remove the final ',' before the '|' ??
I recently learned about the wonders of the getrows statement on a recordset (IE alldata=rstemp.getrows). It dumps a recordset into an array, that I get. Sounds great! My question is: Is there a way to support a SQL shape statement using the getrows statement? I'm guessing that if I try to throw that into a variable it may not like it.
I know that getstring or getrows increase performance but my question when to use this method. This is because what I know is this method will output all fields in a table and not just certain few.
<% ' Loop through the array holding the result set and display the data For iCounter= varC1Begin to varC1End Response.Write("<a href=prices.asp?manuf=" & arrResultSet(0,iCounter) & ">" & arrResultSet(0,iCounter) & "</a><br>") Next %>
In the above Response.Write statement arrResultSet(0,iCounter) displays the manufacturer just like it should.
However, within the hyperlink, if a manufacturer has 2,3, or more words, it will only show the first word. Anything after the first space is ignored. Why?
strQuery = "SELECT whoisserver.host, [domain].domainid, [domain].[domain]" & _ " FROM [domain] INNER JOIN [whoisserver] ON [domain].whoisserverid = whoisserver.whoisserverid"
Which works perfectly. when I use getRows to store the results in an array, the whoisserver.host field isn't in the array. Only the domain.* fields are in the array. Anyone know why this is, and how to solve it? I really need that whoisserver field.
I'm using getrows to speed up data access time, i wonder though if there is a better way. Each recordset returns up to or more than 500 records, this is still quite an overhead for the server when there are lots of people on the site.
Rather than reading all 500 records into the array and then paging the results is it possible to create the recordset with just 25 entries?
ie if you are on page 1 then only the first 25 records are retrieved from the database, page 2 - records 25 - 49 are retrieved etc
I can't seem to get the getrows function of an ADO recordset to work or get a dictionary object to work. I've made them work on other servers before using the same code.
Server is running Windows Powered and IIS 5.0I can provide code, but you must believe this code has worked on other servers.