PC Review


Reply
Thread Tools Rate Thread

creating new record with new file number which is not an auto number

 
 
Larry Rekow
Guest
Posts: n/a
 
      24th Jan 2004
setup: iis 5
creating pages using FP

good at using FP...but currently very limited in ASP 3.0
and promising to buy book today and learn!

need help to let users create a new file that results
in a new file number (the field is named "reference")
that checks the highest current number and increments
it by one.

when the user has saved the new file, the confirmation page,
whether automatically generated or custom will
show them the new number...i can handle that....

the help i need is in saving the perhaps hidden field with
a value that first checks the max number and increments it by one.

desperately want to avoid several users possibly trying to save the
same number at the same time...or perhaps have a custom error which
will allow them to try again without having them re-type in their
info.

many thanks if you can help.

L.




- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
Reply With Quote
 
 
 
 
Larry Rekow
Guest
Posts: n/a
 
      24th Jan 2004
On Sat, 24 Jan 2004 11:39:19 -0800, Larry Rekow <larry@netgeexdotcom>
wrote:

meant to add that i'm also using an access
d/b via a DSN...and want users to create
a new *record*, not file...sorry.

L

>setup: iis 5
>creating pages using FP
>
>good at using FP...but currently very limited in ASP 3.0
>and promising to buy book today and learn!
>
>need help to let users create a new file that results
>in a new file number (the field is named "reference")
>that checks the highest current number and increments
>it by one.
>
>when the user has saved the new file, the confirmation page,
>whether automatically generated or custom will
>show them the new number...i can handle that....
>
>the help i need is in saving the perhaps hidden field with
>a value that first checks the max number and increments it by one.
>
>desperately want to avoid several users possibly trying to save the
>same number at the same time...or perhaps have a custom error which
>will allow them to try again without having them re-type in their
>info.
>
>many thanks if you can help.
>
>L.
>
>
>
>
>- - - - - - - - - - - - - - - - - -
>"Forget it, Jake. It's Chinatown."


- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      24th Jan 2004
Use the Autonumber file in the database, and set it as the Primary Key
field. Then visit the following site to learn how to get this auto number
back to display:

http://www.kamath.com/tutorials/tut004_autonum.asp

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Larry Rekow" <larry@netgeexdotcom> wrote in message
news:(E-Mail Removed)...
> On Sat, 24 Jan 2004 11:39:19 -0800, Larry Rekow <larry@netgeexdotcom>
> wrote:
>
> meant to add that i'm also using an access
> d/b via a DSN...and want users to create
> a new *record*, not file...sorry.
>
> L
>
> >setup: iis 5
> >creating pages using FP
> >
> >good at using FP...but currently very limited in ASP 3.0
> >and promising to buy book today and learn!
> >
> >need help to let users create a new file that results
> >in a new file number (the field is named "reference")
> >that checks the highest current number and increments
> >it by one.
> >
> >when the user has saved the new file, the confirmation page,
> >whether automatically generated or custom will
> >show them the new number...i can handle that....
> >
> >the help i need is in saving the perhaps hidden field with
> >a value that first checks the max number and increments it by one.
> >
> >desperately want to avoid several users possibly trying to save the
> >same number at the same time...or perhaps have a custom error which
> >will allow them to try again without having them re-type in their
> >info.
> >
> >many thanks if you can help.
> >
> >L.
> >
> >
> >
> >
> >- - - - - - - - - - - - - - - - - -
> >"Forget it, Jake. It's Chinatown."

>
> - - - - - - - - - - - - - - - - - -
> "Forget it, Jake. It's Chinatown."



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      24th Jan 2004
File should read Field

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Thomas A. Rowe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Use the Autonumber file in the database, and set it as the Primary Key
> field. Then visit the following site to learn how to get this auto number
> back to display:
>
> http://www.kamath.com/tutorials/tut004_autonum.asp
>
> --
>
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, Forums, WebCircle,
> MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Larry Rekow" <larry@netgeexdotcom> wrote in message
> news:(E-Mail Removed)...
> > On Sat, 24 Jan 2004 11:39:19 -0800, Larry Rekow <larry@netgeexdotcom>
> > wrote:
> >
> > meant to add that i'm also using an access
> > d/b via a DSN...and want users to create
> > a new *record*, not file...sorry.
> >
> > L
> >
> > >setup: iis 5
> > >creating pages using FP
> > >
> > >good at using FP...but currently very limited in ASP 3.0
> > >and promising to buy book today and learn!
> > >
> > >need help to let users create a new file that results
> > >in a new file number (the field is named "reference")
> > >that checks the highest current number and increments
> > >it by one.
> > >
> > >when the user has saved the new file, the confirmation page,
> > >whether automatically generated or custom will
> > >show them the new number...i can handle that....
> > >
> > >the help i need is in saving the perhaps hidden field with
> > >a value that first checks the max number and increments it by one.
> > >
> > >desperately want to avoid several users possibly trying to save the
> > >same number at the same time...or perhaps have a custom error which
> > >will allow them to try again without having them re-type in their
> > >info.
> > >
> > >many thanks if you can help.
> > >
> > >L.
> > >
> > >
> > >
> > >
> > >- - - - - - - - - - - - - - - - - -
> > >"Forget it, Jake. It's Chinatown."

> >
> > - - - - - - - - - - - - - - - - - -
> > "Forget it, Jake. It's Chinatown."

>
>



 
Reply With Quote
 
Larry Rekow
Guest
Posts: n/a
 
      24th Jan 2004
On Sat, 24 Jan 2004 16:55:45 -0500, "Thomas A. Rowe" <(E-Mail Removed)>
wrote:

>File should read Field

+++++++++++++++++++++++++++++++
Many thanks for your response.

My first instinct was to use an auto number id...however....when i
first tried this....i create several "test" records to make sure it
worked. then when i was satisfied it worked, i went back and deleted
these records. but to my chagrin, the 'real' records created after
this did continue the sequence. deleted id numbers were not replaced.
any way around this behavior?? also, if someone were to make a new
record and want to delete it for whatever reason, the id can never be
used again. the people i'm developing this app for don't want holes
in their numbering sequence.

oh, also, i'm using Access as the d/b

thanks.

L

- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      25th Jan 2004
Larry,

Does your client want unique IDs?

If they always want unique ID, then once a ID is assigned, it can't be
re-use.

Unique ID will also allow data to be stored in other table related to the
specific ID, however if the ID where to be re-used, then you may have a
security issue where people or seeing other peoples data, of course this all
depends on the type of data being stored, etc.

To clear the database, you must delete all records in the table, then Tools
| Database | Compact and Repair will then reset the counter to 1. If there
is a record, then the count will not be re-set.
--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Larry Rekow" <larry@netgeexdotcom> wrote in message
news:(E-Mail Removed)...
> On Sat, 24 Jan 2004 16:55:45 -0500, "Thomas A. Rowe" <(E-Mail Removed)>
> wrote:
>
> >File should read Field

> +++++++++++++++++++++++++++++++
> Many thanks for your response.
>
> My first instinct was to use an auto number id...however....when i
> first tried this....i create several "test" records to make sure it
> worked. then when i was satisfied it worked, i went back and deleted
> these records. but to my chagrin, the 'real' records created after
> this did continue the sequence. deleted id numbers were not replaced.
> any way around this behavior?? also, if someone were to make a new
> record and want to delete it for whatever reason, the id can never be
> used again. the people i'm developing this app for don't want holes
> in their numbering sequence.
>
> oh, also, i'm using Access as the d/b
>
> thanks.
>
> L
>
> - - - - - - - - - - - - - - - - - -
> "Forget it, Jake. It's Chinatown."



 
Reply With Quote
 
Larry Rekow
Guest
Posts: n/a
 
      25th Jan 2004
On Sat, 24 Jan 2004 19:23:24 -0500, "Thomas A. Rowe" <(E-Mail Removed)>
wrote:

>Larry,
>
>Does your client want unique IDs?
>
>If they always want unique ID, then once a ID is assigned, it can't be
>re-use.
>
>Unique ID will also allow data to be stored in other table related to the
>specific ID, however if the ID where to be re-used, then you may have a
>security issue where people or seeing other peoples data, of course this all
>depends on the type of data being stored, etc.
>
>To clear the database, you must delete all records in the table, then Tools
>| Database | Compact and Repair will then reset the counter to 1. If there
>is a record, then the count will not be re-set.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I definitely don't want to use an autonumbered ID field as the file
number for the records. since i may in the future need to relate this
table to others easily, i will probably add an autonumbered id field
and make it the primary key.

but for now, i want to have a form that will
1. let users enter data for a new file, and
2. during or just before inserting this new row to the db,
query the db for the max number in it and use the max number +1
for the filenumber field. if in the future, someone ends up deleting
an older number, that's ok, i can live with the occasional gap. but i
want sequential numbering for the filenumber field.

what i've tried so far is to make drw query page that asks for and
displays the highest (max(filenumber)+1 or somesuch). then the user
clicks on it as a hyperlink which passes it as the default value for
the filenumber field on a form that uses the drw bot to create a new
record and show the confirmation page.

problem is, after one user is typing in a form, having picked, say,
number 45, another user selects the same number (45) before the first
user submits the form. the second person who tries to submit gets an
error, then things turn ugly.

so then i tried to make them save the number as soon as they picked it
and go right to a page where they can edit that number, but i can't
get the confirmation page to get the variable of the filenumber so it
can automatically open the edit form with the correct number.
otherwise, the user would have to look at the confirmation page, write
down or remember the new file number, and then go to a form where they
can enter the number in and it will search for and bring up that file
in a form where they can update the rest of the fields with the other
fields. gotta be a better way.

I've got my nose in an ASP 3.0 book i just bought hoping it will give
me an ASP answer.

thanks,

Larry

- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frustrated - Creating Auto Number Susanne Microsoft Access Form Coding 3 14th Dec 2008 02:41 AM
matching Auto-number (primary key) to Record number =?Utf-8?B?Tk1Q?= Microsoft Access 6 12th Jun 2007 07:05 PM
Auto-number and new record... polman Microsoft Access 10 28th Nov 2006 01:13 AM
Access 2000 auto number not giving right master record number. =?Utf-8?B?TXVzaWNtYW5ib2dncw==?= Microsoft Access 5 20th Aug 2005 06:27 AM
Creating a record in every table with the job number entered into =?Utf-8?B?RGFuaWVsIExlZXM=?= Microsoft Access 4 28th Jul 2005 04:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:26 AM.