Questions tagged [autonumber]
158 questions
16
votes
3 answers
What to do when REST POST provides an ID?
I'm developing a JAX-RS API that includes a simple "Person" table with fields "id" and "name", where the "id" is tied to an autonumber in a mysql database. A typical use case would be to POST a new person.
A POST of a JSON message {"name":"Bob"}…

phatfingers
- 9,770
- 3
- 30
- 44
10
votes
2 answers
How to start youtube-dl autonumber from a different number than 1?
I was downloading a playlist from youtube using youtube-dl. I used autonumbering feature to number the videos which could be achieved by formatting the name of output file as follows -o "%(autonumber)s-%(title)s.%(ext)s". The download failed in…

Mohit Mittal
- 643
- 6
- 13
7
votes
4 answers
Using Autonumbering in Access - INSERT statements
I'm having trouble running an INSERT statement where there's an autonumber as the PK field. I have an Auto-incrementing long as the Primary Key, and then 4 fields of type double; and yet Access (using ADO) seems to want five values for the insert…

Smashery
- 57,848
- 30
- 97
- 128
6
votes
4 answers
How to create an AutoNumber field value in Access?
I'm trying the following:
CREATE TABLE Table1
(
RecordNo autonumber, --error here!
PersonId varchar(50),
...
)
But, there is an error.
How can I build the correct query in Access?

Gopal
- 11,712
- 52
- 154
- 229
5
votes
6 answers
Can I edit AutoNumber Column in Access?
I've lost my data in Access base, and I've manage to bring them back but when I copy the values in the table with the AutoNumber Column it increments the numbers.
Is there Any way to change it to int and then bring it back to AutoNumber?

Pece
- 637
- 3
- 9
- 20
5
votes
3 answers
How to get the next identity number used in SQL Server 2005 and ASP?
I was previously getting the next available autonumber used in Access by doing a simple query like so:
SELECT RecordNumber, Info
FROM myTABLE
WHERE 0 = 1
This way I could create a variable to hold the currentRecord and it will use the same…

jesusOmar
- 215
- 1
- 5
- 13
5
votes
3 answers
How to reset an Access table's AutoNumber field? (it didn't start from 1)
I have a INSERT INTO ... SELECT statement that copies data from one table to another.
The thing though is, the AutoNumber column value in the second table started from the last number in the first one.
Meaning the count of first table is 2000, then,…

Lucas Juan
- 351
- 5
- 9
- 23
4
votes
2 answers
Equivalent of SET IDENTITY_INSERT OFF in Access
As the title suggests, is there any way of turning off an autonumber field in Access to allow me to insert a row with an id of my choosing, such as you would do with SET IDENTITY_INSERT OFF in SQL Server?

Coesy
- 936
- 1
- 10
- 30
4
votes
1 answer
Django- how to add 'autonumber' column to tables created by view?
I have a Django project, in which one of my views is displaying a number of tables based on information stored in the database. The view is defined as follows:
def pipeline(request):
...
tables = []
def make_table(detailed_status,…

Noble-Surfer
- 3,052
- 11
- 73
- 118
4
votes
3 answers
Getting autonumber primary key from MS SQL Server
I am currently working in C#, and I need to insert a new record into one table, get the new primary key value, and then use that as a foreign key reference in inserting several more records. The Database is MS SQL Server 2003. All help is…

Zeroth
- 253
- 1
- 2
- 11
4
votes
2 answers
How to Auto-number Repeating sections in InfoPath 2010
I have several rows in my InfoPath form initially arranged in a table. Afterwhich, I've a repeating section consisting of a single row for the user to enter data row-wise in a repeated fashion. Each row needs indexing, the index starting from the…

user1654069
- 41
- 1
- 1
- 3
3
votes
1 answer
Create Duplicate records with autonumber foreign keys
(using SS2008) Within a sql server database, I'd like to copy all the data of one client for a new client. In other words, generate exact duplicates of all records that pertain to client #1, except now the client ID field of the new records refer…

Tekito
- 840
- 8
- 24
3
votes
4 answers
Is there a SQL Server function equivalent to AutoNumber() of QlikView?
First of all: this is not a kind of a IDENTITY() field.
In QlikView, it is used to generate a number based on parameters send to function.
See its documentation here:…

Ricardo Ildefonso
- 43
- 7
3
votes
4 answers
Oracle: auto-increment trigger.
Found the following trigger in a database which was blocking inserts on a unique varchar primary key
CREATE OR REPLACE TRIGGER "BI_PRIVILEGE"
before insert on "PRIVILEGE"
for each row
begin
if :NEW."PRIVILEGE-ID" is null…

Stumbler
- 2,056
- 7
- 35
- 61
3
votes
1 answer
Insert statement in sql with one field set as autonumber
I am having three columns in my table branch i.e id(Autonumber),code(text),desc(text).I am trying to execute this sql
insert into branch(code,desc) values('"+b+"','"+c+"')";
which gives me error syntax error..please help

Saumyaraj
- 1,220
- 3
- 15
- 37