星期四, 3月 27, 2008

[Database] ADO Data Types與數據庫值對應


嘿!有這個對應表的話,用程式來建立資料表就方便多了。


由於用 asp + oldeb for foxpro,所以要參考 Oledb 的部分。


ADO Data Types與數據庫值對應 http://www.zaoxue.com/article/tech-48473.htm








































































































































DataType EnumValueAccessSQLServer
adBigInt20
BigInt (SQL Server 2000 +)
adBinary128
Binary
TimeStamp
adBoolean11YesNoBit
adChar129
Char
adCurrency6CurrencyMoney
SmallMoney
adDate7DateDateTime
adDBTimeStamp135DateTime (Access 97 (ODBC))DateTime
SmallDateTime
adDecimal14

adDouble5DoubleFloat
adGUID72ReplicationID (Access 97 (OLEDB)), (Access 2000 (OLEDB))UniqueIdentifier (SQL Server 7.0 +)
adIDispatch9

adInteger3AutoNumber
Integer
Long
Identity (SQL Server 6.5)
Int
adLongVarBinary205OLEObjectImage
adLongVarChar201Memo (Access 97)
Hyperlink (Access 97)
Text
adLongVarWChar203Memo (Access 2000 (OLEDB))
Hyperlink (Access 2000 (OLEDB))
NText (SQL Server 7.0 +)
adNumeric131Decimal (Access 2000 (OLEDB))Decimal
Numeric
adSingle4SingleReal
adSmallInt2IntegerSmallInt
adUnsignedTinyInt17ByteTinyInt
adVarBinary204ReplicationID (Access 97)VarBinary
adVarChar200Text (Access 97)VarChar
adVarWChar202Text (Access 2000 (OLEDB))NVarChar (SQL Server 7.0 +)