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 / December 2005

Tip: Looking for answers? Try searching our database.

CREATE TABLE statement with Decimal field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Allen - 06 Dec 2005 17:37 GMT
--------------------------------------------------------------------------------

What is the syntax for creating a Decimal field using the CREATE TABL
statement? For example, this works for a Double field:

Currentdb.Execute "CREATE TABLE aTable1 (f1 DOUBLE)"

But this does not work for a Decimal field:

Currentdb.Execute "CREATE TABLE aTable1 (f1 DECIMAL)"

Neither does this work:

Currentdb.Execute "CREATE TABLE aTable1 (f1 DECIMAL(10,2))

--
Alle
George Nicholson - 06 Dec 2005 19:36 GMT
http://support.microsoft.com/default.aspx?scid=kb;en-us;275561
Description of the new features that are included in Microsoft Jet 4.0

Under "A new Microsoft Jet 4.0 data type":
"Decimal data types are new to Microsoft Jet 4.0. ....Supported synonyms are
Dec and Numeric....
This data type is not supported via Data Access Objects (DAO). It is
supported only with ActiveX Data Objects (ADO). "

HTH,
Signature

George Nicholson

Remove 'Junk' from return address.

> --------------------------------------------------------------------------------
>
[quoted text clipped - 10 lines]
>
> Currentdb.Execute "CREATE TABLE aTable1 (f1 DECIMAL(10,2))"
MGFoster - 08 Dec 2005 06:31 GMT
Access 2002 and higher.

If you can, put your DB in ANSI-92 compatible syntax.

How:
With the focus on the Database window, on the main menu select:  Tools >
Options > Tables/Queries tab > SQL Server Compatible Syntax (ANSI-92) -
check "This Database."

Then you can use DAO and DDL statements to create a table w/ a Decimal
data type.

Warning:  The use of wildcards will change to % in place of * and to _
in place of ?.
Signature

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

> http://support.microsoft.com/default.aspx?scid=kb;en-us;275561
> Description of the new features that are included in Microsoft Jet 4.0
[quoted text clipped - 6 lines]
>
> HTH,
 
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.