Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

DMAX Function Equivalent in nuBuilder?

Questions related to using nuBuilder Forte.
Post Reply
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

DMAX Function Equivalent in nuBuilder?

Unread post by pmjd »

Hello,

Is there an equivalent to the DMAX function in MS Access?

I have been using the autonumber function in nuBuilder but found that if you delete the highest record number, i.e. 19, the next record will take the value 20 and 19 ends up missing from the database. Is there a way to set the autonumber back, rather than having to manually set it on the Input tab of the form?

Thanks,
Paul
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: DMAX Function Equivalent in nuBuilder?

Unread post by Janusz »

Hi, you can try as following:
https://www.techonthenet.com/mariadb/au ... _reset.php

Code: Select all

Syntax
In MariaDB, the syntax to reset the AUTO_INCREMENT column using the ALTER TABLE statement is:

ALTER TABLE table_name AUTO_INCREMENT = value;
table_name
The name of the table whose AUTO_INCREMENT column you wish to reset.
value
The next value that will be used in the AUTO_INCREMENT column.
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: DMAX Function Equivalent in nuBuilder?

Unread post by kev1n »

pmjd wrote: I have been using the autonumber function in nuBuilder
Consider using an SQL AUTO INCREMENT Field
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

Re: DMAX Function Equivalent in nuBuilder?

Unread post by pmjd »

Thank you guys, will have a look :)
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: DMAX Function Equivalent in nuBuilder?

Unread post by apmuthu »

MySQL / MariaDB:

Code: Select all

ALTER TABLE table_name AUTO_INCREMENT = 1;
The above will automatically set it to the next available ID if numeric.
Post Reply