Ohh...i forgot...when you have identified the highest unique id then
you could add 1 to it then you could have a unique id.


On Fri, 4 Mar 2005 08:19:33 +0800, GJ <[EMAIL PROTECTED]> wrote:
> Set an SQLQuery...Try this:
> 
> SELECT Max(unique id) FROM table_name -- "Max" finds the highest id in
> the database but if your system have the ability to accept multiple
> inputs at the same time maybe you should add a WHERE in this select
> statement(let's say WHERE name= & strFullName
> 
> Then execute query. Good luck!
> 
> 
> On Thu, 03 Mar 2005 23:41:44 -0000, dcase14
> <[EMAIL PROTECTED]> wrote:
> >
> > Good morning everybody
> >
> > I'm attempting to add records to an access database from an ASP form.
> > Unfortunately, the database was designed by someone else and doesn't
> > have an autonumber unique id. Can anybody tell me how to find out the
> > last record and add a new one so it doesn't over-write an existing record?
> >
> > The pseudo-code is something like:
> >
> > 1 Set Connection
> > 2 Execute SQL
> > 3 Set RecordSet
> > 4 Define variables for each table field
> > 5 Assign a unique ID to the new record <-- this is the problem
> > 6 Post data to new page with updates the database
> >
> > The way I see it, the solution will be to identify the maximum number
> > of the id field and + 1. I just can't find out anywhere how to do this.
> >
> > Thanks in Advance
> > nick
> >
> >
> >
> >
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> >
> > ________________________________
> > Yahoo! Groups Links
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
> >
> > To unsubscribe from this group, send an email to:
> > [EMAIL PROTECTED]
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to