Re: Syntax Error in field definition
- From: kontra <kontra@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Nov 2006 09:30:01 -0800
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.
- References:
- Re: Syntax Error in field definition
- From: Allen Browne
- Re: Syntax Error in field definition
- From: Brendan Reynolds
- Re: Syntax Error in field definition
- Prev by Date: Re: Syntax Error in field definition
- Next by Date: Re: How to regain focus to access application?
- Previous by thread: Re: Syntax Error in field definition
- Next by thread: Re: Syntax Error in field definition
- Index(es):
Relevant Pages
|