Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

strange query error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joseph S. - 06 Jul 2006 12:27 GMT
Hi all,
the following query does not work :
(I am using a generic database access tool to create tables and enter
data into an mdb file)

CREATE TABLE Customers
(
  CustID      autoincrement(10,10)    not null ,
  CompanyName text(75)    NULL,
  ContactName text(75)    NULL,
  CustType    text(10)    NULL,
  Area        text(50)    NULL,
  Address     text(255)   NULL,
  City        VARCHAR(50)    NULL,
  State       VARCHAR(50)    NULL,
  PINCode     VARCHAR(10)    NULL,
  Phone       VARCHAR(50)    NULL,
  Mobile      VARCHAR(50)    NULL,
  Fax         VARCHAR(50)    NULL,
  Email       VARCHAR(80)    NULL,
  CurrCredit  DECIMAL(18,2)  NULL,
  primary key (CustID)
);

The error from Access 2000 is:
An error occurred when executing the SQL command:
CREATE TABLE Customers
(
  CustID      autoincrement(10,10)    not null ,
  CompanyName text(75)    NULL,
  ContactName text(75)    NULL,
  CustT...

[Microsoft][ODBC Microsoft Access Driver] Syntax error in field
definition. [SQL State=37000, DB Errorcode=-3553]

Total execution time: 0.0s
(Statement 22 of 22 finished.)

I thought maybe Area is a keyword for Access 2000, so I changed the
column name to MyArea - but same result.

CustType surely could not be a keyword.

Then I tried making all text fields as text(N), no luck
Then all text fields as Varchar(N), still no luck.
Finally, deleted the column MyArea, still no luck.

BTW, both text(N) and Varchar(N) work perfectly fine - I tried that out
with another table.

Any clues what is wrong?

TIA,
JS
OfficeDev18 - 06 Jul 2006 13:51 GMT
Joseph,

When I threw the SQL into Access' query designer, I got the error message on
this line:

 CurrCredit  DECIMAL(18,2)  NULL,

with the word DECIMAL selected. I don't know why, but maybe you can figure
out the problem.

Sam

>Hi all,
>the following query does not work :
[quoted text clipped - 51 lines]
>TIA,
>JS

Signature

Sam

Joseph S. - 06 Jul 2006 16:57 GMT
> Joseph,
>
[quoted text clipped - 5 lines]
> with the word DECIMAL selected. I don't know why, but maybe you can figure
> out the problem.
Hi, thanks for the reply.

That got me thinking in the right direction - if a keyword shows an
error, look up the error _and_ the keyword in usenet/MSDN

and this is what i found:
firstly,
from the microsoft.com page on access 2000:
http://support.microsoft.com/default.aspx?scid=kb;en-us;275561
"Supported synonyms are Dec and Numeric"
numeric worked for me.
It also has a lot of info on create alter table, user, group etc.

Then these two posts for decimal  in a query:
http://groups.google.com/group/microsoft.public.access/browse_thread/thread/54e9
39a31d2da688/6db507b849bd91f3?q=decimal(&rnum=9#6db507b849bd91f3


and

http://groups.google.com/group/microsoft.public.access.queries/browse_thread/thr
ead/a506da802b7d72fa/8f3da86925ae16ef?q=decimal(&rnum=6#8f3da86925ae16ef


Problem more or less solved.

Thanks,
JS
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.