I am building an asp webshop and have an accesss database with all the products. I can create a catalogue page using repeating regions to display all the products no problems but I want to customise a bit. Just say I want to display products 3, 7 and 10, what I have been doing is to created 3 seperate recordsets in Dreamweaver with the filter ProdID = Entered Value 3, 7 and 10 respectively.
I then bind the product name, price, description for each of the 3 products to the page. My questions - Is there a better way of doing this especially if I have a catalogue page with many products and many recordsets. I want to build the pages in this manner so it is like a static page but with a database content (not with repeating regions).
Is it possible to have just 1 recordset and pass the values 3, 7 and 10 through it and then bind the results to the page seperately (How do I code it?). If this is possible is it a more efficient way of working than having a seperate recordset for each product. Is it a drain on the server to have to deal with say 10 recordsets or it OK?
I found a displaying records of a Database in a HTML table,but i want the opposite. I want to insert the content from an HTML or ASP page and no a TXT file into a Database.
I have a database that has a column for an expiring date. How would I query the database to display only records whose expiring date is greater than the current date? For example, if the current date was 6/16/2004 and there were these expiring dates: 6/1/2004 6/15/2004 6/17/2004 6/18/2004 then only 6/17 and 6/18 would display.
my search engine shows 14 records per page and displays the total number of pages with that search criteria.
if there are 140 search results it shows 10 page links at the bottom of the screen ( 1 2 3 4 5 6 7 8 9 10)it also does the same thing if there are 1400 results 1 2 3 4 5 6 7 8 9 10 11 12 13 etc etc up untill 140)
i am trying to stop this and only allow it to show 10 page links at a time then next, for example if there are 12 pages it would look like this 1 2 3 4 5 6 7 8 9 10 >next> (then the next links. i would like this to show 10 pages each time.
I am working on exporting my results to excel and running into an issue where I wasn't getting any records but have since now been able to see some records now....it appears to only be showing records that I have added thru the web interface to the database, it's not showing the records that I imported (SQL database).
My results.asp displays all the records properly, it's just not working on my export to excel. I've looked at the data in the SQL table but I don't see anything unusual. Has anyone ever run into this before and have any clue on what I can check now?
I've got some code that displays public event info on a page - unfortunately, it seems to have stopped working today for some reason and I don't know why (there are 2 records in the database that match the criteria, so I know that's not the problem: Code:
I have a search page which has radio buttons for two search options (location, price) and checkboxes for one other option (type). The radio buttons reference the "general" table in my database, and the checkboxes reference boolean records in the "cuisine" table.
My task is to display, on a subsequent page, records that match the two radio buttons selected as well as each checkbox. Code:
// displaying the returned results Do While (Not objRS.EOF << spit out records >> objRS.MoveNext Loop
Now, is there an instance of objRS I can call that will just display how many records were returned? I tried objRS.Count on a longshot, but that didn't work
Im looking for a very simple and small script that will display 2 random records for a database, but i havnt found one yet. Can someone help me on this one?
Say i have 100 rows in a table and i make a query:"Select * from table", i will get all the 100 rows displayed, but what i want to do is to display 20rows in a page and then have 'Next' and 'Previous' links to navigate through the records 20 by 20. This is in fact exactly as in this forum where only 20 posts are displayed sorted by most recent ones and so on.
I am trying to display all the records in my database when I click a button that I made. Can anyone show me how to do that? Right now I have no code for this. I just want a button on my page, so that someone can print out a list of all the records in my database and have it for reference.
I have created a website using dreamweaver mx 2004 and access 2000 for the database. i want to display the results of a recordset in a grid with a different record in each grid. the grid will be fixed in width and the cells will be fixed in width and height but if more cells are required (eg more records to display) then they will be added to the bottom of the grid. at the minute its not working. This is a screenshot of what im sort of after.
I'm displaying records from an Access db and would appreciate advice on the most efficient/easiest way of displaying a field.
The db holds a list of furniture products where there are a number of ranges. Each record has the range name against it but I've only put the range description against the first record in that range Code:
I am displaying a table that contains 36 columns and 20-40000 rows.The first row is a header.When i scroll the page down the header disappears(anyways this is a fact).Is there any way in which i can keep the header/first row constant when i scroll the page downwards or sideways for n number of records? I am using Access as the Backend and the front scripting is by ASP and connecting thru ADO.
I currently have entries in my dbase with time stamps. Does anyone know how I would display only those records with the time stamp that reflects a particular day. For example I want to display all records from today which would be 8/23/2004 on the page.
Im assuming this has something to do with the Date () function but i dont understand how it could incorporate it into code.
I have an ASP page where I want to display the 3 most recent records within a database using a SQL query. The problem is that my page which output the results is only showing the first most recent record and not the two past ones aswell.
Am I right in thinking that might be related to the 'loop' function? I know that my SQL code is fine as I have previewed the results from the code and they are correct. Code:
I'm having trouble with the recordset object. I'm trying to use the "RecordCount" aspect of the recordset but it keeps diplaying "-1". How do I get it to show the total count of records?
The problem concerns 2 tables, cart_products and cart_shoppingcart.
Cart_products contains all the product data (eg, prices, product's key name, etc), but most importantly, it contains the quantity of stock (prod_quantity) for each item.
cart_shoppingcart contains all of the user's items in their shoppingcart, including those that are part of an (customer) order; these have the order_number to differentiate from those that aren't in any order (their Order_number is 'no_order', the others have the order number).
Now, what I want to do is this:
For every item in the order (ie, every entry in cart_shoppingcart that matches the username and order number), take the quantity (x) the customer is ordering, then take the quantity of stock remaining (y), then subtract x from y to create the new stock level (z) and update the appropriate record in cart_products with z (all this with SQl preferably).
I was thinking of using a Do while loop, but realised that it wouldn't work as I'd have to use several SQL statements and then I'd run into a problem the minute ASP reads "objrec.movenext".
I'm trying to pull the last 5 records from my database.
<% j=5 rs.MoveLast While ((j>0) AND (NOT rs_article.BOF))%> ''Execute HTML and data insertion here
<%rs_article.MovePrevious j=j-1 Wend%>
Everytime I attempt to run this code, I recieve an HTTP 500- Internal Server Error. It tells me no more than that. I know that my connection settings are OK because when I move forward through the database (first five records), the code executes without error. And yes, my Cursor type is Dynamic.
Alternatively, I would also like to know how to add new recordset to the beginning of a database rather than the end.
I have an Access database with two fields that I would like to group by. The two fields are location and department. Field names are "Location" and "DeptName".
I have the code correct for grouping by location. That code looks like this: Code:
I have XML and XSL documents stored in SQL Server 2000 field. On the asp page i will be getting these documents from the database and then displaying the content of the XML document according to the XSL on the asp page. How can i do this? Also after getting the documents from the database do i need to store these on the server as .XML and .XSL and then read through these or i can directly read from these document without saving these physically.
I'm pulling data into ASP from Sybase IQ. When the data is in the database its displayed correctley: //C://.... When I pull it into an asp page, the formating changes, and a few of my slashes disappear. Is there a special method of pulling slahes into asp?
Say i have the following names displayed on a page.
ABCD CDFG FGHI
Now if i click on ABCD,this name should get displayed in the text boc.I dont want to have a submit button.
I just want to basically select this name and the moment i select this name ,it gets displayed in the text box and thn i hit submit and the value in the text box hits the DB.
I have an access database and users can search through it. Is it possible to display the first 20 results on one page and then display the next 20 on another page and so on and so on..
I have a requirement to display a message and then redirect the controls to some file, I tried with the below method but its not working, where as If I use server.transfer or server.execute it works but I cant give relative Url (it will dynamically genrate), If any one has an alternate way, pls respond.
ShowMessage("Hello World")
Sub ShowMessage(sMessage) Response.Write "<script> alert("& Chr(34) & sMessage & Chr(34) &" ); </script>" Response.redirect "xyz.asp" End Sub
When I retrieve this data into standard text boxes (using ASP/ADO) so that the user can update/file the following problems occur on what I would call price fields:
10 << I want 10.00
11.6 << I want 11.60
12.89 << this is fine
My MySQL DB holds prices as decimal(10,3) so I know the decimal data isn't chopped at this point.
Before the data is displayed in these boxes I created the below function to parse the data before it is written to the boxes: Code:
I'm sure I'm missing something completely obvious, but I can't figure out what. I have a path to an image file stored in a database. I'm trying to align the image to the right, but nothing seems to be working:
I have ASP (classic) code that writes out a table and sets the <img....> tag with a virtual directory source, e.g. src='/test/imghold/xyz.png', and the images do not appear on the IE page. The code is from a production site that works fine.
We just duplicated the web site to one named test and now the images do not display. The IMG item is in a TD element of a table. Also, I looked at the "view source" of the page and it shows the <IMG src='/test/imghold/xyz.png'...> just fine. I even tried it with different images and none of them show up.