473,322 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Jet database: Add new 'Key' column

In my new app (close to complete, yay!) I am using data from an
existing Jet database. This database i have used for almost a year, so
it already has a bunch of existing data.

This database has a table that does NOT have a 'key' column. My app
really needs the table to have a 'key' column... preferably one that is
auto-incrementing.

Anyway, in Access, it allows me to add a column, but it will not let me
make it auto-numbering. I get an error saying that i cannot do it
because data already exists in my database. Also I cannot make a new
column a 'key' because when i save the table, an error says i cannot
have "null" values.

Do I have to create a new table from scratch? Please say it ain't so!!

Thanks,
John

Nov 21 '05 #1
4 1135
John,

I just tried adding an AutoNumber column to a table in Access 2002 and it
worked without problems.

Kerry Moorman
"johnb41" wrote:
In my new app (close to complete, yay!) I am using data from an
existing Jet database. This database i have used for almost a year, so
it already has a bunch of existing data.

This database has a table that does NOT have a 'key' column. My app
really needs the table to have a 'key' column... preferably one that is
auto-incrementing.

Anyway, in Access, it allows me to add a column, but it will not let me
make it auto-numbering. I get an error saying that i cannot do it
because data already exists in my database. Also I cannot make a new
column a 'key' because when i save the table, an error says i cannot
have "null" values.

Do I have to create a new table from scratch? Please say it ain't so!!

Thanks,
John

Nov 21 '05 #2
John,

If there is one thing I never will do anymore is use a autoincrement columns
if it is not needed. It gives me all kind of troubles if there are related
tables that has to be inserted.

I use as unique key identifier a GUID

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps,
Cor

Nov 21 '05 #3
I used Access 2003. I cannot have an Autonumber field unless i start a
table from scratch. Hmmm....

John

Nov 21 '05 #4
Thanks!

John

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nick | last post by:
I am building a photo album webpage and am not sure exactly how I should organize the database. Here's where Im at so far... I have one table called 'images' which contains the columns 'albumID',...
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
2
by: bardo | last post by:
I don't know if there is a solution to this question, but I am hoping there is. What I would like to know is the follow. I made thru Access a database with 1 tablel having a primary key (column...
0
by: cwbp17 | last post by:
I'm having trouble updating individual datagrid cells. Have two tables car_master (columns include Car_ID, YEAR,VEHICLE) and car_detail (columns include Car_ID,PRICE,MILEAGE,and BODY);both tables...
25
by: Colin McKinnon | last post by:
Hi all, There's lots of DB abstraction layers out there, but a quick look around them hasn't turned up anything which seems to met my requirements. Before I go off and write one I thought I'd...
4
by: danthrom | last post by:
Hi, I have a database with four tables. tbl_Client client_alias (PK, text) tbl_Matters matterID (PK, autonumber) matter (text) client_alias (foreign key, tbl_Client)
10
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the...
76
MMcCarthy
by: MMcCarthy | last post by:
Normalisation is the term used to describe how you break a file down into tables to create a database. There are 3 or 4 major steps involved known as 1NF (First Normal Form), 2NF (Second Normal...
0
bartonc
by: bartonc | last post by:
With one small change to the view/control: self.staticText3 = wx.StaticText(id=wxID_DBCONNECTDIALOGSTATICTEXT3, label='ODBC Data Source Name', name='staticText3',...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.