If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Setting primary key error
I have a very large table. In a database by itself its about 340mb.
When I try to set the primary key it says "Changing field data types" then gives me an error "Can't change field data types - Not enough disk space or memory". It's not a disk space problem so it must be memory. Any ideas on how to get around this? Can I write code to create the new key and table in another database? This project is due Friday!! Any short cuts would be appreciated! TIA Jim |
#2
|
|||
|
|||
Create a new database. Import all the other tables. Create
a new table with the correct field types. Import all the data. Recreate any relationships. (david) "Rover" wrote in message ... I have a very large table. In a database by itself its about 340mb. When I try to set the primary key it says "Changing field data types" then gives me an error "Can't change field data types - Not enough disk space or memory". It's not a disk space problem so it must be memory. Any ideas on how to get around this? Can I write code to create the new key and table in another database? This project is due Friday!! Any short cuts would be appreciated! TIA Jim |
#3
|
|||
|
|||
In looking at the help file for "keys" in Access 2K there is no mention
of field types for keys. I am actually using 4 fields of type long integer, integer, text (length 12) and integer. What are the field types it needs? david epsom dot com dot au wrote: Create a new database. Import all the other tables. Create a new table with the correct field types. Import all the data. Recreate any relationships. (david) "Rover" wrote in message ... I have a very large table. In a database by itself its about 340mb. When I try to set the primary key it says "Changing field data types" then gives me an error "Can't change field data types - Not enough disk space or memory". It's not a disk space problem so it must be memory. Any ideas on how to get around this? Can I write code to create the new key and table in another database? This project is due Friday!! Any short cuts would be appreciated! TIA Jim |
#4
|
|||
|
|||
On Wed, 16 Mar 2005 21:05:31 -0500, Rover
wrote: I have a very large table. In a database by itself its about 340mb. When I try to set the primary key it says "Changing field data types" then gives me an error "Can't change field data types - Not enough disk space or memory". It's not a disk space problem so it must be memory. Any ideas on how to get around this? Can I write code to create the new key and table in another database? This project is due Friday!! Any short cuts would be appreciated! TIA Jim I'm not sure just what you're actually doing, Jim. Access can create a Primary Key on any field type except for Memo or OLE - you don't have to create a field or change any field types to define a primary key! All you need to do is open the table in design view, and ctrl-click on up to ten fields which jointly define a unique record. If you then click the Key icon, Access will create a (pretty much invisible to you or the user) Primary Key index on that field (or those fields). If you're getting "Changing field data types" as a message, I must suspect that you are doing something ELSE. John W. Vinson[MVP] |
#5
|
|||
|
|||
I don't know for sure what the problem is but here was the solution...
I copied the table structure only. I then set the keys and indices the way I wanted them. I then wrote an append query taking my non-keyed table and appending it to the newly created Keyed table. Problem Solved. I had 3 tables that were this large or larger and the error and solution worked on all 3. Rover wrote: I have a very large table. In a database by itself its about 340mb. When I try to set the primary key it says "Changing field data types" then gives me an error "Can't change field data types - Not enough disk space or memory". It's not a disk space problem so it must be memory. Any ideas on how to get around this? Can I write code to create the new key and table in another database? This project is due Friday!! Any short cuts would be appreciated! TIA Jim |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SubForm tries to insert primary key twice. duplicate error happens | Tom Frink via AccessMonster.com | Using Forms | 0 | January 13th, 2005 11:03 PM |
Error setting up Outlook w Earthlink email account | PennyB | Installation & Setup | 1 | November 13th, 2004 06:21 PM |
Import Excel Into Access - Primary Key Error | Karl Burrows | General Discussion | 5 | August 5th, 2004 01:35 AM |
error 2614 setting SourceObject | chris | Using Forms | 2 | June 24th, 2004 07:13 AM |