.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET 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:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old May 13th, 2008, 01:58 AM
Abitha Abitha is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 25 Abitha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 2 m 33 sec
Reputation Power: 0
ASP.Net/VB.Net - Want a logic......

hi!

i am developing back end form for uplaoding stories for our site.using asp.net and ms access.

here the fields of the database are

Month,Year,Volume No.,Issue No.,Story No.,country,headline,story and imgname.

here the concept is

Quote:
8 stories --> 1 Issue

12 Issues -->1 Volume


I want to upload story acc to this concpet.

1) if i upload story means the form should decide under which issue it should go.

2) after first 8 stories the Issue no. should be 2. like this it should grow acc to number of stories.

3) like this after 12 th issue the Volume no should be 2. like this it shuld grow acc to number of issues

its fixed that each volume contains 12 issues only and each issues contains 12 stories only.

pls tell me idea acc to this.

Thank u in advance.

Reply With Quote
  #2  
Old May 15th, 2008, 12:36 PM
macu macu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 macu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 41 m 31 sec
Reputation Power: 0
You could just do away with the Volume No and Issue No fields in your table and replace them with an autonumber ID field. Then you know that the first 8 stories are issue 1, the next 8 stories are issue 2, etc. You also know that the first 96 stories are volume 1, the next 96 volume 2 and so on.

This will be a problem if you delete stories but deleting stories with your current table design would cause similar issues as you'd have to reassign volume and issue numbers (unless you allowed issues/volumes to have < 8 or 96 stories when things are deleted).

If you use the above you could retrieve any issue or volume from a simple calculation, e.g. all stories in volume 3, issue 5 could be retrieved with something like:

SELECT <fields>
FROM <table>
WHERE ID > 2 * 96 + 4 * 8
AND ID <= 2 * 96 + 5 * 8

Or more generally:

SELECT <fields>
FROM <table>
WHERE ID > (volume - 1) * 96 + (issue - 1) * 8
AND ID <= (volume - 1) * 96 + issue * 8

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > ASP.Net/VB.Net - Want a logic......


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


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway