access field types... and they fields ???????

P

PP

somebody could send me the list of "Field Types" supported for access

I am sending this command...

CREATE TABLE usuarios (
ID int(10) NOT NULL auto_increment,
IDUsr int(11) NOT NULL default "0",
Nome varchar(40) default "0",
SenhaExpira tinyint(3) NOT NULL default "0",
Validade datetime default NULL,
Nivel tinyint(3) NOT NULL default "0",
PRIMARY KEY (ID),
UNIQUE KEY idxLogin (ID,Login),
KEY idxNome (ID,Nome))

but they gives errors...
cold somebody help me..

Thanx in advance...

PP
 
A

Allen Browne

Please excuse the HTML post:

JET (Interface)
DDL type[1]
DAO constant / value
ADOX constant / value

Text
TEXT (size)[2]
dbText
10
adVarWChar
202

[3]
CHAR (size)
dbText[4]
10
adWChar
130

Memo
MEMO
dbMemo
12
adLongVarWChar
203

Number: Byte
BYTE
dbByte
2
adUnsignedTinyInt
17

Number: Integer
INTEGER
dbInteger
3
adSmallInt
2

Number: Long
LONG
dbLong
4
adInteger
3

Number: Single
SINGLE
dbSingle
6
adSingle
4

Number: Double
DOUBLE
dbDouble
7
adDouble
5

Number: Replica
GUID
dbGUID
15
adGUID
72

Number: Decimal
DECIMAL (precision, scale)[5]
dbDecimal
20
adNumeric
131

Date/Time
DATETIME
dbDate
8
adDate
7

Currency
CURRENCY
dbCurrency
5
adCurrency
6

Auto Number
COUNTER (seed, increment)[6]
dbLong with attributes
4
adInteger with attributes
3

Yes/No
YESNO
dbBoolean
1
adBoolean
11

OLE Object
LONGBINARY
dbLongBinary
11
adLongVarBinary
205

Hyperlink
[7]
dbMemo with attributes
12
adLongVarWChar with attributes
203

[8]
BINARY (size)
dbBinary
9
adVarBinary
204




--------------------------------------------------------------------------------

[1] There are numerous synonyms for these names, such as DATE for DATETIME, SHORT for INTEGER, FLOAT for DOUBLE, LONGTEXT for MEMO, MONEY for CURRENCY. Some synonyms work in limited contexts, e.g. ADO only.

[2] Include the brackets if you specify a size (number of characters).

[3] You cannot create a fixed-width Text field through the interface.

[4] To create a fixed width field with DAO, set the field's Attributes to: Attributes And dbFixedField.

[5] Not available in the Access query interface or DAO. Use ADO to Execute the DDL query statement.

[6] The initial seed value and increment value are optional, and can be used only with ADO.

[7] The Hyperlink type field cannot be created with DDL.

[8] The fixed-width binary type field cannot be created with the user-interface.
 
P

PP

could you translate this sql code of mySQL to access to me...
I realy try to convert but I steel have many problens like AutoNumber and size of Field...

thanx by the field types... but this autonumber is kiling me...

PP



"Allen Browne" <[email protected]> escreveu na mensagem Please excuse the HTML post:

JET (Interface)
DDL type[1]
DAO constant / value
ADOX constant / value

Text
TEXT (size)[2]
dbText
10
adVarWChar
202

[3]
CHAR (size)
dbText[4]
10
adWChar
130

Memo
MEMO
dbMemo
12
adLongVarWChar
203

Number: Byte
BYTE
dbByte
2
adUnsignedTinyInt
17

Number: Integer
INTEGER
dbInteger
3
adSmallInt
2

Number: Long
LONG
dbLong
4
adInteger
3

Number: Single
SINGLE
dbSingle
6
adSingle
4

Number: Double
DOUBLE
dbDouble
7
adDouble
5

Number: Replica
GUID
dbGUID
15
adGUID
72

Number: Decimal
DECIMAL (precision, scale)[5]
dbDecimal
20
adNumeric
131

Date/Time
DATETIME
dbDate
8
adDate
7

Currency
CURRENCY
dbCurrency
5
adCurrency
6

Auto Number
COUNTER (seed, increment)[6]
dbLong with attributes
4
adInteger with attributes
3

Yes/No
YESNO
dbBoolean
1
adBoolean
11

OLE Object
LONGBINARY
dbLongBinary
11
adLongVarBinary
205

Hyperlink
[7]
dbMemo with attributes
12
adLongVarWChar with attributes
203

[8]
BINARY (size)
dbBinary
9
adVarBinary
204




------------------------------------------------------------------------------

[1] There are numerous synonyms for these names, such as DATE for DATETIME, SHORT for INTEGER, FLOAT for DOUBLE, LONGTEXT for MEMO, MONEY for CURRENCY. Some synonyms work in limited contexts, e.g. ADO only.

[2] Include the brackets if you specify a size (number of characters).

[3] You cannot create a fixed-width Text field through the interface.

[4] To create a fixed width field with DAO, set the field's Attributes to: Attributes And dbFixedField.

[5] Not available in the Access query interface or DAO. Use ADO to Execute the DDL query statement.

[6] The initial seed value and increment value are optional, and can be used only with ADO.

[7] The Hyperlink type field cannot be created with DDL.

[8] The fixed-width binary type field cannot be created with the user-interface.
 
A

Allen Browne

Use the DDL column of the table.

Some attributes can only be set with the DAO library, though.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

could you translate this sql code of mySQL to access to me...
I realy try to convert but I steel have many problens like AutoNumber and
size of Field...

thanx by the field types... but this autonumber is kiling me...

PP
 
P

PP

could you convert this sql to access, to me, I dont know how can I...
i´ll be gratefull..

PP
 
P

PP

please.. can someone convert this sql to access... because, I realy try but
this autonumber is killing me...

thanx....

PP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top