Solved

MS Access - Unlimited or Infinity

Posted on 2004-03-28
6
837 Views
Last Modified: 2008-03-06
Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
0
Comment
Question by:geekhelp
6 Comments
 
LVL 2

Expert Comment

by:eric_duncan
ID: 10701309
My understanding is that the number field has to have either a discrete value or null. I have seen other people solve this issue by "reserving" a specific value that will be used to indicate infinity - this is often the upper bound of the number field or a null value. The advantage of using null, if you don't need it otherwise, is that mathematical operations using null closely resemble mathematical operations using inifinity because the result is always null.

Let me know if this helps!

eric
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 10701406
>>Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
The simplest way is to assign an 'impossible' value as Default to the number field to represent the 'infinity' or 'unlimited' value, like put a value of -1 in your field's Default value ?
0
 
LVL 2

Expert Comment

by:Carlovski
ID: 10703739
Eric is right,
Database nulls, and infinity do share many properties, but using a Null is likely to really confuse people who aren't used to databases, or mathematics!
Also, the properties that they do share, may not be want you want (i.e nothing is ever equal to eiher Null or infinity, even null or infinity!)
The safest thing may be to hold if it is infinite value in a separate field (Being picky, numeric fields should hold discrete values)
What exactly are you trying to record?
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:geekhelp
ID: 10721508
The field is for a Doggy Daycare database - It keeps track of how many "available passes" the dog owner has on their account. When a dog is "Checked in" to our facility a pass is automatically deducted from this field.
Owners can purchase a monthly unlimited pass and I am trying to figure out how I can represent this in the database, so that it stays the same even when the field has 1 subtracted from it. Thanks
0
 
LVL 2

Accepted Solution

by:
eric_duncan earned 250 total points
ID: 10722752
There isn't any way you can make the database handle this situation automatically - you are going to have to use some application logic to figure out whether or not someone has an unlimited pass or not. Probably the easiest way to do that would be to add a Boolean field to the table to track whether or not someone has unlimited passes on their account and then check this value in your application logic.

Eric
0
 

Author Comment

by:geekhelp
ID: 10729256
Thank You all who helped reach this conclusion!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL 11 79
vcenter 6 u2 install question 1 100
Do Functions perform better than dynamic (inline) SQL in PostgreSQL? 3 100
Need a starter for ETL protocol? 4 33
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now