Re: Expiration Dates

Dale E. Reed Jr. ( (no email) )
Wed, 18 Feb 1998 00:13:55 -0800

Mitch Wagers wrote:
> Using them for expiration/extensions...which is what the MasterAccount's
> fields do, but it isn't as useful to disable 1000 accounts based on a
> MasterAccount. Now that that is out of the way, why is RadiusNT selecting
> and DateAdding twice on the same fields? And, if it doesn't work right, then

It has two bound columns. Rather than create a complete different branch
of code for MS Access, its easier to just select the MA expirate twice
(Once for the ma expiredate field and again for the sa expiredate field).
Then RadiusNT treats it just as normal.

> why is it implemented for the MasterAccounts table but not SubAccounts?

Because the masteraccounts expiredate/extend can NOT be null. The
Subaccounts CAN. Therefore, if the subaccounts is NULL, the DateAdd()
in Access blows up. Give it a try. :)

> If this is just "not up for discussion," then I'd like to add it to a
> wishlist for RadiusNT because not everyone can afford the thousands of
> dollars for a complete SQL system AND the money for a machine to handle it.

Its much easier to get a single date from the RDBMS, rather than get
three more additional fields from the database, and then add two of
them to one field, and one to another field. There really never should
have been a SubAccounts expiredate date, as several have tried to use
it in a way it wasn't designed to be used.

> >> While running the debug, I also noticed in the SELECT statement the use of
> >> DateAdd. I hope I'm assuming correctly there is code to handle an expiration
> >> date of 1/25/97 and Extension of 10, so the final result from DateAdd is
> 2/4/97?
> >
> >DateAdd() is an RDBMS function. All of them handle month/year rollovers
> >just fine.
> I know it works correctly, I use it myself in several applications; that's
> why it says 2/4/97 and not 1/4/97. I was talking about the code within
> RadiusNT, but it was only a question. I wasn't talking about DateAdd
> handling the rollover, mute point now.

The DB just returns a date after doing the DateAdd() computation. Yes,
RadiusNT can intepret a date correctly. :) One of the things I want to
add is getting the SQL Server date in the query, and not using the local
clock at all.

> On a whim I got our RadiusNT License key working, by removing one zero to
> make it 24 characters. I checked, double checked, triple checked the key we
> were sent...I still had to remove a zero. <-----This might help the other
> person with their licensing problem.

Forward the message to me. I'd like to see it.

-- Dale E. Reed Jr.  (       IEA Software, Inc.      |  RadiusNT, Emerald, and NT FAQs Internet Solutions for Today  |