f



Help needed with databases + asp problem

Hi,

I'm new to databases & asp and am using dreamweaver mx 2004 (trial) to go about
making dynamic pages.  I was wondering if anyone could help me with a problem
that I'm having, I would think its pretty easy to solve...

Basically what I want to do is to have webpage showing the top news stories of
the day with a limit of 3 database (ie news) entries per page.  Obviously the
top stories will change day by day and I will be adding them to the database
via an asp form.  This part is no problem.  Where my problem arises is that if
I limit the repeat region asp command to 3 entries on the page, then the page
will only display the first 3 entries in the database and not the new entries
that I add.  What I want to do is to replace the oldest news story (ie the
first in the database) with the newest (ie the last added to the database) and
show the newer news story on the webpage with the oldest entry being "bumped"
so to speak.  However, I would like to keep the older news stories in the
database, just not have them on the website.  

Does anyone know how I would go about this in dreamweaver or access?  I would
have thought it would be as simple as to just sort them descending rather than
ascending but can't quite work out how to do this!!!

Any help would be greatly appreciated! :)

Rob F.
0
rforey (3)
7/15/2004 12:16:56 AM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

2 Replies
567 Views

Similar Articles

[PageSpeed] 37

Rob,

Why don't you just add a yes/no field to your news table called 
FrontPage or something.  Check it by default, then uncheck it for the 
old(er) articles you don't want to display.  Does the process have to be 
automated?

Rob Forey -- The Man With No Nails wrote:

> Hi,
> 
> I'm new to databases & asp and am using dreamweaver mx 2004 (trial) to go about
> making dynamic pages.  I was wondering if anyone could help me with a problem
> that I'm having, I would think its pretty easy to solve...
> 
> Basically what I want to do is to have webpage showing the top news stories of
> the day with a limit of 3 database (ie news) entries per page.  Obviously the
> top stories will change day by day and I will be adding them to the database
> via an asp form.  This part is no problem.  Where my problem arises is that if
> I limit the repeat region asp command to 3 entries on the page, then the page
> will only display the first 3 entries in the database and not the new entries
> that I add.  What I want to do is to replace the oldest news story (ie the
> first in the database) with the newest (ie the last added to the database) and
> show the newer news story on the webpage with the oldest entry being "bumped"
> so to speak.  However, I would like to keep the older news stories in the
> database, just not have them on the website.  
> 
> Does anyone know how I would go about this in dreamweaver or access?  I would
> have thought it would be as simple as to just sort them descending rather than
> ascending but can't quite work out how to do this!!!
> 
> Any help would be greatly appreciated! :)
> 
> Rob F.

-- 
--------------------------------------
Chris Moore
cdmwebs [at] no_spam_hotmail [dot] com
http://cdmwebs.com
0
cdmwebs (8)
7/15/2004 12:22:18 AM
TOP 3 would indeed be good to put in the SQL statement but also criteria to
limit the records shown to be that of the current date.

strSQL = "SELECT TOP 3 * FROM MyTable WHERE MyDate = #" & Date() & "#"

Best regards,
J. Paul Schmidt, Freelance Access and ASP Web Developer
www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Demo, ASP Bar Chart Tool...
0
jpaulsch (20)
7/19/2004 9:05:46 PM
Reply:

Similar Artilces:

Need Help on MLM database in MS Access
I am working on a MS Access database to track the sales of a 3 Tier Multi- level Marketing system. I have created a table to track a new RepID and a SponsorID. I have created a query that will show the Sponsor and all of their reps but I am not sure how to show the reps that the second tier has sponsored. Example: RepID 0011 SponsorID 0010 RepID 0012 SponsorID 0010 RepID 0013 SponsorID 0010 The above is easy but I am not sure how to get: RepID 0014 SponsorID 0013 and his SponsorID 0010 Does anyone have any idea of a good way to do this? Thank you, Brent Brent, It concept, it is a hierarchical data problem. Others here have solutions different from the three I know about. Each solution to this problem has its benefits and drawbacks. Study each one to decide which works best for you. Solution 1: Single table joined to itself and modeling a one-to-many relationship between a row in the table and other related rows in the same table. Solution 2: Two tables, one is the detailed information about each thing in the hierarchy (sales representative in your case) and the other is a two column list of primary keys from the first table that lists which thing in the first table is related to the other and modeling a many-to-many relationship between a row in the first table and another row in the first table. Solution 3: Two tables like Solution 2 but with as many columns as are needed in Table 2 to list each level of the hierarchy. This can make navigating...

Need help understanding web form / ASP / Access database etc
I have been trying for nearly 2 weeks to find the answer, I hope someone can help me. Sorry it is so long, but want to give you as much info as possible. Would even be happy to give you a copy of my very popular Graphics Management program I re-sell worth $158 if someone can help me through this. *** My resourses *** I have an HTML program (Namo Web Editor) - Power user I have access on my ISP for ASP, PHP etc - Know nothing about this I have access to a secure server on my site - Access through FTP I have MS Access and can create a basic database - Not a bad knowledge I have MYOB Accounting package - Not a bad knowledge *** My objective *** For customers to go to my web site, place an order and 'sumit' the order which will be stored on the secure server (credit cards). Then I would receive an email that there is an 'Order' - I would then link to the database through a URL to print off the order and process it. (Would *love* to be able to inport the data into MYOB Acoounting to save me retyping everything). I have created a form on a web site (Name, address, phone, email, product, payment details, credit card etc etc) *** Questions ** The question really is, what componts do I need to build to create my 'shopping cart'?. I just don't understand the relationship between Form, submit, MS Access, ASP, etc. What goes in the 'Submit' key? What do I need to add to my HTML form for it to populate the database? (same...

HELP! Retriving field names and properties from MS Access database using ASP
Hi everyone! I have a really frustrating error and need help. I’m trying to do a function that gets the properties and names of the fields in a MS Access database using ASP. I haven’t programmed in a while so I’m quite lost. Once I have the my database structure I will insert the corresponding fields from a web form but the database is huge and I want to be able to change the database and form without changing the ASP code all the time. This is my function that is not working yet. I cant seem to connect properly to the database... Function InsertDataBase() ...

accessing MS Access database fila via ODBC problem
Hi! I'm trying to connect to a MDB file via ODBC like this: char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; SQLAllocEnv(&env); SQLAllocConnect(env, &hdbc); SQLBrowseConnect(hdbc, (UCHAR*)DSN, strlen(DSN), (UCHAR*)buf, BUF_SIZE, (SQLSMALLINT*)&rcvlen); The function SQLBrowseConnect fails and SQLGetDiagRec returns "IM001 Driver does not support this function" Can anyone help me? Thanks! David On Sun, 10 Jul 2005 12:55:30 +0200, David Siroky <dsiroky@email.cz> wrote: >Hi! > >I'm trying to connect to a MDB file via ODBC like this: > >char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; > >SQLAllocEnv(&env); >SQLAllocConnect(env, &hdbc); >SQLBrowseConnect(hdbc, > (UCHAR*)DSN, > strlen(DSN), > (UCHAR*)buf, > BUF_SIZE, > (SQLSMALLINT*)&rcvlen); > >The function SQLBrowseConnect fails and SQLGetDiagRec returns >"IM001 Driver does not support this function" > >Can anyone help me? > >Thanks! > >David > Hi Maybe you need to post to another group, this one is very VB-based, but 1. Can't you use ADO instead of ODBC? It is a lot ea...

Ms. Access database problem
Hello, I have a MS. Access database in XP. When I open the database in design view, users will get an error message & cannot even open the database. Is there any way to solve this problem? Thanks for your help in advance. Orchid What error message? Did you try the standard compact/repair routine? Thanks for your reply! The error message is: "The database has been placed in a state by user 'Admin' on machine 'Name' that prevents it from being opened or locked." Yeah, I tried the standard compact/repair routine, (which is under Tool, Database Utilities, Compact and Repair Database...)but still got the same error message. "Orchid" <yhtong86@yahoo.com> wrote in message news:<1112194542.469115.105910@g14g2000cwa.googlegroups.com>... > Thanks for your reply! > The error message is: "The database has been placed in a state by user > 'Admin' on machine 'Name' that prevents it from being opened or > locked." > > Yeah, I tried the standard compact/repair routine, (which is under > Tool, Database Utilities, Compact and Repair Database...)but still got > the same error message. try deleting the *.ldb file on the machine that has it opened or locked. Orchid wrote: > Hello, > I have a MS. Access database in XP. When I open the database in design > view, users will get an error message & cannot even open the database. > Is there any way to solve this problem?...

Problem with MS Access Database
------=_NextPart_000_0038_01C56A17.539605A0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hello, I'm using wxWidgets now a long time for designig my applications. This weekend I tried first to use the Database classes, but I've got a problem with them... I've got an Microsoft Access Datenbase, with two tables: Orte(ID, Staat, Name, and so on) PLZOrte(ID, PLZ) This tables are set into a relationship. The field ID ist the primary key in Orte and set up the relation. Now I'd like to do a query to this database in my...

Database Database Database Database Software Cheap
Database Database Database Database Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

a database, is a database, is a err database
How many times can we see the same request from someone who wants to access data from a 'pick' database through what has come to be 'standard' practices (odbc, oledb) and still get the same old sloppy ' buy this proprietary utility (and above all, my services)' answer. I think most of these pick flavors should have some sort of layer (by now!) to handle this; If someone needs to do this, the service is really 'education' i.e to show them how. Lets cut the shit now and stop with this tired and silly BS and sad marketing schlock. Regards, -Jim Jim wrote: > How many times can we see the same request from someone who wants to > access data from a 'pick' database through what has come to be > 'standard' practices (odbc, oledb) > and still get the same old sloppy ' buy this proprietary utility (and > above all, my services)' answer. I think most of these pick flavors > should have some sort of layer (by now!) to handle this; If someone > needs to do this, the service is really 'education' i.e to show them > how. Lets cut the shit now and stop with this tired and silly BS and > sad marketing schlock. > > Regards, > > -Jim Jim who? I wonder? What is this? An attack on capitalism? Providing services for those who perhaps lack the time, skill, or knowledge to perform such tasks is hardly a crime. Maybe "standard" odbc and...

need help on a Logical problem for my database
Hello, I'm creating a discography for one artist on a web page. I started to create to database, but i'm stuck. This is the logic so far: i have a table named "album" i have another table called "track" 1 album contains multiple track, and 1 track can be in more then one album. So I created the table: album_track So far so good. Here's were i'm stuck. How do i represent multiple disc in one album? should i create another table called "disc" or do i insert the disc number somewhere in the "album_track" table along the position of the t...

Help setting up Ms-Access Database
I'm hoping that someone here can give me some assistance with a database I'm trying to set up. My skills in Access are fairly basic, and I'm trying to skill up, but some of the stuff is a little opaque. I'm trying to put some data I've got on paper into Access. Recently, I got together with some other people marketing organic produce and offered to do some marketing for us on a coop basis in the city. The idea I had was to have four marketing packages for coop members with different rates and services. For want of something better lets call them P1, P2, P3 & P4 I'm thinking I'll need a table with the packages, and one listing the coop members with their details. In theory, a coop member might acquire another farm (either a new one or one from someone bailing out) and put it on a separate package. Which tables would have to have a relationship? I'm thinking the packages table containing the dat about each package would have to be related via a common field to the coop member table, and there would probably have to be a link between that and the farm table, through common fields -- maybe a unique ID in the coop member table could appear in the farm table and maybe the primary key from the package table could also appear in the farm table as a foreign key. But am I right? I'd also like to create a form that would list an individual coop member's details plus any packages they own and assume that all I'd need to do would ...

MS Access database with a file extension of .mde
Good day: Can you kindly assist me in opening a MS Access database with a file extension of .mde? I get an error message stating "This database is in an unrecognized format". Any help is greatfull. TIA This usually indicates an attempt to open an Access 2000 database in an earlier version. -- MichKa [MS] NLS Collation/Locale/Keyboard Development Globalization Infrastructure and Font Technologies This posting is provided "AS IS" with no warranties, and confers no rights. "mary" <chloemelmom@yahoo.com> wrote in message news:a0a64947.0311151242.4df0c...

need help on Access database glitch
I am using a custom built Access database from 2002. The Access version is 2003. The computer was just upgraded from Windows 98 to Vista. after the conversion, certain forms and queries don't work. It appears that the selective forms are not permitting data to be entered. however, we don't have rights management built in. The crazy thing is when a programmer friend download the database onto his computer, these forms and queries worked fine. On my end, I've used four different computers to no avail. Some were running XP, others Vista. But when I use the old computer running Windows 98, the forms and queriers work. I have opened up the forms in Design View, and made sure the editing features and data entry features were all set to "yes". So it would appear that the settings are correct. But does anyone know if there are anything else I could try, or are there other settings within Access or the actual computer that could be causing this? ...

Help connect Ms access database
Hello All, I am trying to connect an MS database without utilizing the help of the "querybuilder", I know how to do that using the "querybuilder" but this can't work as I am trying to do an exe file and be able to use it for other pc's that I have. I am doing the following, please correct me if I am wrong, but it is not working at all: dbpath=[matlabroot,'a\toolbox\database\dbdemos\trial.accdb']; conurl = ['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};' ... 'DBQ=' dbpath] conn=database('Trial_now','','&#...

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but I don't know what software is >needed. Do you know? If so, please answer this post. Thanks. I think it comes down to semantics. "Licensed" vs "Loaded". No you can't create an app that will run on a PC with nothing loaded. Yes you can create an app that will run on a PC where nobody's paid the fee to run MS Access. You still have to install something on that PC, however. What it is is a freebie version of MS Access that only runs applications - doesn't allow anybody to develop an app. You develop the app on your PC, which has MS Access installed. Then somebody installs the freebie ("Runtime Access") on somebody's PC and they can run the app you developed without having to pay any money to anybody. -- PeteCresswell Sue, If Access isn't present, some version of it must be installed to run an Access database. VB.NET, ...

Printing MS Access Database Structure in ASP
How can I print the database structure, including non default variables like Requiered, FieldSize, and most important DESCRIPTION. I want a table like this: ----------------------------------------------- | Name | Type | Size | Required | Description | ----------------------------------------------- | ... | ... | ... | ... | ... | Does anyone know how to do this? I can only print Name and Type as they are predefined variables. Thanks in advance! Alternatively, how can I copy my variable descriptions from MS Access' Design View to another program (SPSS or EXCEL or a text...

Help needed to connect to remote Access database
I'm working on a project which requires me to connect to a remote Access database on a server, using C++ (not MFC). I've written some code to connect to a LOCAL access database file on my own machine and everything works fine. I can't seem to figure out how to get ODBC to talk to a remote Access database though. Can anyone suggest what I might try to get this to work? To make the local access database connection I used function SQLDriverConnect. I tried modifying the connection string to include the keyword SERVER=www.myurl.com but for some reason I just get this er...

Need help with using Access databases on the web
Hi all, I hope this is the right group... if not, a pointer would be appreciated. Our club is setting up a web site (HTML & ASP) with some information that will be provided by an Access database. The problem that I've run into is that the application fails because the Access driver is looking for a "Workgroup identification file". I don't know of a way to provide such a file because the server (host) is not under our control, and even if such a thing could be done, it wouldn't be desirable for other reasons. What is the best way to go about resolving this? TIA Neil Neil Gould wrote: > Hi all, > > I hope this is the right group... if not, a pointer would be > appreciated. > > Our club is setting up a web site (HTML & ASP) with some information > that will be provided by an Access database. The problem that I've > run into is that the application fails because the Access driver is > looking for a "Workgroup identification file". I don't know of a way > to provide such a file because the server (host) is not under our > control, and even if such a thing could be done, it wouldn't be > desirable for other reasons. > > What is the best way to go about resolving this? > > TIA > > Neil Access uses a workgroup file for security. The default workgroup file used by Access is system.mdw (or system.mda in old versions). I would have thought though that this was optionala...

Problem with MS Access 97 database security
All, I recently started at a company that has a number of older MS Access 97 database applications that support production and order fulfillment. There is one database with which I have the following problems: 1) no one can make modifications to the database except by logging in using the database creator's userid and password on the workstation used by that person, who has of course left the company. Anyone else who tries to access the database, even the system administrator, gets the message "You dont have the nececssary permissions to use the xxxxxxxxx object.Have your system administrator or the person who created the object establish the appropriate permissions for you." 2) We logged in and "added" another person with the same permissions as the creator for all database objects, except we did not change the database object "ownerships", and the problem still persists. I suspect that the ownerships are the problem. Is this so? 3) I dont know anything about the restriction to a particular machine. Can anyone enlighten me on this issue? TIA JL <jliebman@kjlsoftware.com> wrote in message news:1176986756.146353.213270@e65g2000hsc.googlegroups.com... > All, > > I recently started at a company that has a number of older MS Access > 97 database applications that support production and order > fulfillment. There is one database with which I have the following > problems: > > 1) no one can make modifications ...

MS Access Help: Copying database Relationships
Does anyone know if there's an easy way to export or copy the relationship structure from one mdb to a new one? The relationships in the db are time consuming to reproduce. I am trying to make a copy of a database including all the relationships, forms, queries and modules while still within the original database. This has to be a relatively automated process (button click). Any suggestions? yeah; use ACCESS DATA PROJECTS and you can do this all through TSQL. -aaron Instead of Exporting, make: Get External Data --> Import... All the existing relationships will be imported with the tables. Click on the Options button on the Import dialog window to have more choices. Also, I don't see your need to have made that much crossposting. -- Sylvain Lafontaine, ing. MVP - Technologies Virtual-PC "news.giganews.com" <anthony@cambria.com> wrote in message news:3PqdnaFVzZFht1HfRVn-vw@giganews.com... > Does anyone know if there's an easy way to export or copy the relationship > structure from one mdb to a new one? The relationships in the db are time > consuming to reproduce. I am trying to make a copy of a database including > all the relationships, forms, queries and modules while still within the > original database. This has to be a relatively automated process (button > click). Any suggestions? > > Check out the CreateRelation method in Access Help. There is an example there. I have not done this, ...

MS Access Script to import data from external mde database to mdb database
Hi, Does anyone know of a way I can write a script that imports a table from a particular .mde file? I don't seen any obvious way to do it as a macro. Any suggestions if it can be done as a macro or as a written module? My ultimate goal is to have script that clears info out of 1 table in an .mdb file, imports an identically structured table from a .mde file, runs an append query I have in place to copy the data from the imported table to the table in my.mbd file, and then delete the imported table. Any help that could be provided would be greatly appreciated. Best wishes, George Hadley ghadley_00@yahoo.com With DBEngine(0)(0) .Execute "DELETE * FROM Suppliers WHERE SupplierID IN (SELECT SupplierID FROM Northwind.mde.Suppliers)" .Execute "INSERT INTO Suppliers SELECT * FROM Northwind.mde.Suppliers" End With Is this code I would run as a module? Yes or you could use the strings in two separate saved queries. ...

Problem with MS Access 97 database security #2
All, I recently started at a company that has a number of older MS Access 97 database applications that support production and order fulfillment. There is one database with which I have the following problems: 1) no one can make modifications to the database except by logging in using the database creator's userid and password on the workstation used by that person, who has of course left the company. Anyone else who tries to access the database, even the system administrator, gets the message "You dont have the nececssary permissions to use the xxxxxxxxx object.Have your system administrator or the person who created the object establish the appropriate permissions for you." 2) We logged in and "added" another person with the same permissions as the creator for all database objects, except we did not change the database object "ownerships", and the problem still persists. I suspect that the ownerships are the problem. Is this so? 3) I dont know anything about the restriction to a particular machine. Can anyone enlighten me on this issue? TIA JL ...

Database planning - Hierarchical problem
Hi, I'm actually on a problem i don't manage to resolve. I want to implement a thing like this in a table : Albert John / \ / / \ / Bert Chuck / | \ / | \ / | \ / | \ Donna Eddie Fred \ / \ / \ / Gilbert ...

Help Needed With Bizarre Database Behaviour In Access 2003
I have a simple database which was originally written in Access 97. When converted to Access 2000 file format it ran flawlessly in Access 2002. I've just tried to run it in Access 2003 and I am seeing the following behaviour: Some of the fields on the continuous main form which is a list of jobs with their related details "flicker". While this is going on the form seems to function as it should and isn't locked up. If I click and hold in any field the flickering stops until I release the mouse button. There are 3 fields in the form footer which sum the values of 3 related ...

Web resources about - Help needed with databases + asp problem - comp.databases.ms-access

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Fearing no punishment, Denver cops abuse crime databases for personal gain
(credit: Noel Hidalgo ) Denver police officers performed searches on state and federal criminal justice databases that were not work-related ...

Open source database improves protection and performance
Most enterprises rely on databases in some form or another, but they can be vulnerable to attack from people looking to steal information. They ...

Larry Ellison shrugs off Amazon, Microsoft play for Oracle database business
... companies – Amazon (Nasdaq: AMZN) and Microsoft (Nasdaq: MSFT) – both made it easier for Oracle's (NYSE: ORCL) customers to move their databases ...

NTTC's Liquid Products Database making steady progress
NTTC's Liquid Products Database making steady progress Modern Bulk Transporter NTTC is asking carriers to suggest “proprietary blends” for ...

Amazon Web Services Announces that over 1,000 Databases Have Migrated to AWS since January 1, 2016
Amazon Web Services, Inc. (AWS), today announced that the AWS Database Migration Service is now generally available.

Taiwan launches database on areas vulnerable to quake damage
BEIJING (AP) — Earthquake-prone Taiwan is launching a database to inform residents which areas might be susceptible to creating potentially catastrophic ...

Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work
Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work

Microsoft's SQL database software now runs on Linux
Remember when Steve Ballmer likened Linux to cancer, and the notion of Microsoft courting the open source crowd was virtually unimaginable? The ...

Resources last updated: 3/21/2016 3:47:20 PM