A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting primary key error



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2005, 02:05 AM
Rover
external usenet poster
 
Posts: n/a
Default 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  
Old March 17th, 2005, 03:12 AM
david epsom dot com dot au
external usenet poster
 
Posts: n/a
Default

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  
Old March 17th, 2005, 03:25 AM
Rover
external usenet poster
 
Posts: n/a
Default

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  
Old March 17th, 2005, 06:09 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

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  
Old March 18th, 2005, 02:08 AM
Rover
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.