Create Table with Microsoft Jet 4.0

M

Mohan

I am sendng the following SQL Scritp via Micrsoft Jet

CREATE TABLE tab1 (
[emp_id] char (255) WITH COMP NOT NULL,
[fname] uniqueidentifier NOT NULL ,
[minit] char (255),
[lname] char (255) NOT NULL ,
[job_id] char (255) NOT NULL ,
[job_lvl] char (255),
[xx] int,
[c1] char (255),
[c2] char (255),
[c3] char (255),
[c4] char (255),
CONSTRAINT tab5_PrimaryKey PRIMARY KEY (emp_id)
)
I get back the message "Record is too large"
I used the WITH COMP option as well but no difference.
Any idea what is happening here? Is there a restriction
on the number of fields with char as an option when
working via Microsft Jet? I thought the WITH COMP option
would take care of that????

Thanks in advance,
Mohan
 
A

Arvin Meyer

I don't use DDL very often and I'm working from memory, but I believe you
need to set the index (constraint) in a separate statement.

The other problem I see is a 2K row limit and you have 9 fields with 255
bytes (more than 2K). You sure don't need first, mi, and last name or any of
the ID fields to be over 30 or 40 characters.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
D

david epsom dot com dot au

I think CHAR type is a fixed length field. Try it with VARCHAR instead.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top