Re: Syntax Error in field definition

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Duh, Thanks, I am missing my brains today.
--
If at first you don''''''''t succeed, destroy all evidence that you tried.


"Brendan Reynolds" wrote:

You appear to have one too many left parenthesis characters in there. I
believe it's the one between 'SLMN' and 'CHAR' in 'SLMN (CHAR(3))'.

--
Brendan Reynolds
Access MVP


"kontra" <kontra@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CB6A5CED-7D27-45AC-8FB5-5BACE6A1DA5A@xxxxxxxxxxxxxxxx
It ran the first time, but if I delete the table and try running it again
I
get an error message again, are the limitations?
CurrentProject.Connection.Execute "CREATE TABLE tblInvoiced (IID
CHAR(1),INVOICE DECIMAL(6),LINE DECIMAL(4),ACCOUNT DECIMAL (5),DATE1
DECIMAL(7),WAREHOUSE CHAR(3),MFGR CHAR(3),COLOR CHAR(3),PATTERN
CHAR(9),PRICE1 DECIMAL (9,2),COST1 DECIMAL(9,2),SLMN (CHAR(3))"
--
If at first you don''''''''t succeed, destroy all evidence that you tried.


"Allen Browne" wrote:

Microsoft has not bothered to update the DAO library to support the
Decimal
type since it was introducted 6 years ago.

As a result, your query won't work in DAO code, nor through the normal
mechanisms (such as RunSQL), nor through the query interface (since
Access
natively uses DAO.) It should work if you execute the query under ADO,
i.e.:
CurrentProject.Connection.Execute "CREATE ...

However, you should also understand that the Decimal type is very poorly
implemented, and Access is not even able to sort the field properly.
Details:
http://allenbrowne.com/bug-08.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"kontra" <kontra@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AC09B19E-C912-4B3F-AC60-622170DAFF0D@xxxxxxxxxxxxxxxx

I have a sql statement in Access module to create a table :
'*******************
DoCmd.RunSQL "CREATE TABLE tblInvoiced (IID CHAR(1), INVOICE
DECIMAL(6),LINE
DECIMAL(4,0),ACCOUNT DECIMAL (5,0),DATE1 DECIMAL (7,0),WAREHOUSE
CHAR(3),MFGR
CHAR(3),COLOR CHAR(3),PATTERN CHAR(9),PRICE1 DECIMAL (9,2),COST1
DECIMAL
(9,2),SLMN (CHAR(3))"
'********************
I checked the references and everything seems to be correct, am I
missing
a
part of my brain? this gives me an error "Syntax error in field
defenition" I
tested it and it doesn't like DECIMAL definition. Can someone help me
and
let
me know why would I get that error.

Thank you very much.
--
If at first you don''''''''t succeed, destroy all evidence that you
tried.






.



Relevant Pages

  • Re: gummer dweeber - no military service
    ... If you had brains you would understand the only thing I don't dispense is BS. ... Well, for all his faults, he also is smarter than you are. ... As an adult you aren't on an elite level. ... But if you want anyone to believe what you claim you better present evidence. ...
    (rec.crafts.metalworking)
  • Re: gummer dweeber - no military service
    ... What is inconsistent in being a working person with lots of brains? ... Well, for all his faults, he also is smarter than you are. ... As an adult you aren't on an elite level. ... with no evidence. ...
    (rec.crafts.metalworking)
  • Re: OT...Singularity in the cosmos
    ... Inventing a creator and ignoring the evidence ... That's a rather long winded away of saying "I don't know". ... Actually, shit for brains. ... He was just illustrating the point that God created man. ...
    (rec.gambling.poker)
  • Re: ID is dead
    ... >>> trauma on their brains, or other neurological damage after e.g. drug ... > display in varying degrees intelligent behaviour. ... you're free to discount such evidence. ... At least ghosts are *described* objectively: Manifestations that several people can see at the same time. ...
    (talk.origins)
  • Re: Dattebayo throws a hissy fit
    ... I have seen no EVIDENCE that there is any intent to destroy anything. ... none of them have given any evidence that "they want to destroy us". ... The only exception being if a large exterior force DELIBERATELY crushes you. ...
    (rec.arts.anime.misc)