problem inserting a field

C

CTG

There is a table and i m trying to insert a record into that table.
All seems fine expect one field that it comes with syntax error (Field
Order)

INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText) VALUES
(13,'Detail','Chip Colour:','N') // OK


INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText,Order)
VALUES (13,'Detail','Chipolour:','N',1) // NOT OK



When I examine the fields I get Order as Number with the following..:

Field Size :Long Integer
Decimal Places: Auto
Default Value :0
Required:No
Indexed:No

Manually you can chnage the Field Order but using the above you
cant.... Help
 
J

John W. Vinson

There is a table and i m trying to insert a record into that table.
All seems fine expect one field that it comes with syntax error (Field
Order)

INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText) VALUES
(13,'Detail','Chip Colour:','N') // OK


INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText,Order)
VALUES (13,'Detail','Chipolour:','N',1) // NOT OK



When I examine the fields I get Order as Number with the following..:

Field Size :Long Integer
Decimal Places: Auto
Default Value :0
Required:No
Indexed:No

Manually you can chnage the Field Order but using the above you
cant.... Help

Order is a reserved word in queries (it's a keyword for the ORDER BY clause).
As such if you (unwisely) use it as a fieldname you must enclose it in square
brackets:

INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText,[Order])
VALUES (13,'Detail','Chipolour:','N',1)
 
S

Saeed

There is a table and i m trying to insert a record into that table.
All seems fine expect one field that it comes with syntax error (Field
Order)
INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText) VALUES
(13,'Detail','Chip Colour:','N') // OK
INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText,Order)
VALUES (13,'Detail','Chipolour:','N',1) // NOT OK
When I examine the fields I get Order as Number with the following..:
Field Size :Long Integer
Decimal Places: Auto
Default Value :0
Required:No
Indexed:No
Manually you can chnage the Field Order but using the above you
cant.... Help

Order is a reserved word in queries (it's a keyword for the ORDER BY clause).
As such if you (unwisely) use it as a fieldname you must enclose it in square
brackets:

INSERT INTO DETAILTABLE (Setup,RowName,FieldName,FieldText,[Order])
VALUES (13,'Detail','Chipolour:','N',1)

--

             John W. Vinson [MVP]- Hide quoted text -

- Show quoted text -

Thanks , I did not design the table .Like everything else we all
inheret the crap.
 

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