problem inserting a field

  • Thread starter Thread starter CTG
  • Start date Start date
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
 
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)
 
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.
 
Back
Top