ms access asp create table syntax problem

ms access asp create table syntax problem

am 01.02.2006 09:16:10 von Marcus Green

Hi,
I have an ms access database and need my asp code to create a table that has
a column type of currency. (similar as defined when you create such a column
directly in ms access). I can get the syntax to work fine for other data
types but not "currency". Can anyone tell me the correct syntax please?

sSQL = " Create Table mytable " & _
" (col1 TEXT(8) CONSTRAINT PK PRIMARY KEY, " & _
" col2 DATETIME, " & _
" col3 INTEGER ) "

works fine, but I can't for the life of me create a currency column. Any
help would be REALLY appreciated.

Thanks
Marcus

Re: ms access asp create table syntax problem

am 01.02.2006 12:43:31 von reb01501

marcus green wrote:
> Hi,
> I have an ms access database and need my asp code to create a table
> that has a column type of currency. (similar as defined when you
> create such a column directly in ms access). I can get the syntax to
> work fine for other data types but not "currency". Can anyone tell me
> the correct syntax please?
> sSQL = " Create Table mytable " & _
> " (col1 TEXT(8) CONSTRAINT PK PRIMARY KEY, " & _
> " col2 DATETIME, " & _
> " col3 INTEGER ) "
>
> works fine, but I can't for the life of me create a currency column.
> Any help would be REALLY appreciated.

The Access online help has a section called Microsoft Jet SQL Reference (you
can only see this by looking at the table of contents). In the overview is a
topic about SQL daatypes in which you will find that "MONEY" is the keyword
you are looking for.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"