Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm developing some code that will eventually talk to an Oracle 10g database. While doing this, I am also redesigning the relevant database tables. I'm not a database pro, and I don't have sufficient privileges on our Oracle server (even in the development database) to create and alter tables at will. Rather than constantly harass our DBA every time I discover my design is broken, I've just created an MS Access database that I can alter as I please. I'll use the access database while I develop my code, and then we will install the updated code and create the new tables at the same time.

One of the fields in my tables is an ID number that needs to be generated when a row is inserted to the table. In Oracle I'd make a trigger for this, but I have not been able to find this functionality in Access. Is it possible to achieve the same effect in any way?

share|improve this question
1  
Why not use SQL Server Express instead? It supports triggers. –  Nick Chammas Jan 6 '12 at 19:04
    
Whereas in Oracle you need a trigger and a sequence to generate an auto-incrementing ID, in SQL Server you would use an IDENTITY column. Access probably has an equivalent. –  Nick Chammas Jan 6 '12 at 19:08
5  
Having different RDBMSs in dev and prod is a recipe for pain. Consider Oracle Express Edition for dev? –  Jack Douglas Jan 6 '12 at 19:14
3  
Scratch my earlier suggestion, ColinK. I'm with @JackDouglas. –  Nick Chammas Jan 6 '12 at 19:16
2  
If you're using triggers you're already risking differences in how databases act. Little projects like this grow, someone needs to give you access to or get you an Oracle test DB. –  Ben Brocka Jan 6 '12 at 21:07
show 3 more comments

1 Answer

If the ID is simply a number look intot the autonumber feature in Access.

share|improve this answer
2  
welcome to dba.se Keith and thanks for this contribution - are you willing to flesh your answer out a little or perhaps add a relevant link? –  Jack Douglas Jan 6 '12 at 19:20
    
To elaborate on this slightly, when designing the table in Access, just set the field's Data Type to AutoNumber. There are a few options you can tweak down in the Field Properties pane, but generally you can go with the defaults. –  db2 Jan 6 '12 at 20:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.