SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 15th, 2001, 11:35 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 23
SQL string used with AutoNumber field in Access

<i><b>Originally posted by : Harry Ragsdale (webmaster@sevendustweb.net)</b></i><br /><br />I am back again. I have my photo album working for the most part. However, I did hit one snag.<br /><br />The script works fine as long as there are no more than 9 pictures in the database. Once 10 pictures are entered, the database lists them like this... : 1,10,11,12,2,3,4,5, etc....<br /><br />What is happening is that when I am going through the pictures on the website, the first picture has the "NEXT" arrow like it is supposed to. When I click on it, it takes me to the second picture, which is what I want. However, once I view the second picture, there is no "Next" arrow. There is only a "Back" arrow. Essentially, when I start with the beginning picture, I can only look at the first two.<br /><br />For an example, got to this URL: http://www.hvrdesigns.com/portfolio/photos/photos.html<br /><br />Once there, click on Days Of The New. Notice that the database only contains 5 photos. If you click on any one of the images, it works perfectly.<br /><br />Now, go back to http://www.hvrdesigns.com/portfolio/photos/photos.html. <br /><br />Now, click on Everlast. Notice that in this database, I have a total of 16 photos. If you click on one of the middle photos, you will see what is happening. <br /><br />When you look at a big photo on my website, they "KEY" that is generated is a number in the database. The number is in the field "ID". I was thinking of setting this field to AutoNumber. However when I tried this, I got a weird error. I know that the code is not wrong because once I perfected the code, I rehashed it for every single band. All I had to change was the name of the database and the rest worked.<br /><br />I tried playing around with the SQL.<br /><br />My initial string which I must keep is this:<br /><br />SELECT * FROM pics where ID=" & quote & Request.QueryString("key") & quote; <br /><br /><br />I was told the following string will allow you to use AutoNumber with ASP:<br /><br />"SELECT Max(id) FROM pics<br /><br />KEEP IN MIND THAT "ID" IS THE FIELD THAT HOLDS ALL THE NUMBER VALUES CORRESPONDING TO THE PICTURES.<br /><br />What is going on here? Please tell me you know what is wrong. I am almost done with this project and am ready to get it off the ground.<br /><br />PLEASE HELP ME!!!

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > SQL string used with AutoNumber field in Access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT