SQLite DB에다가 Adapter를 사용하여 DataTable을 Update 하려고 하니 DbType과 일치하는 실제 DB의 column type이 명확하지 않아 찾아보았더니 관련내용이 정리된 문서가 있어 공유합니다.
Since the SQLite engine is inherently typeless and ADO.NET is much more strongly typed, the ADO.NET wrapper must make certain decisions about the columns returned in any given SQL query. One of the deciding factors is the underlying datatype declared in the CREATE TABLE statement.
The following lists the datatypes and mappings the SQLite ADO.NET wrapper understands. If there is anything missing, wrong, or needs adding, please let me know:
COUNTER | DbType.Int64 |
AUTOINCREMENT | DbType.Int64 |
IDENTITY | DbType.Int64 |
LONG | DbType.Int64 |
TINYINT | DbType.Byte |
INTEGER | DbType.Int64 |
INT | DbType.Int32 |
VARCHAR | DbType.String |
NVARCHAR | DbType.String |
CHAR | DbType.String |
TEXT | DbType.String |
DOUBLE | DbType.Double |
FLOAT | DbType.Double |
REAL | DbType.Single |
BIT | DbType.Boolean |
YESNO | DbType.Boolean |
LOGICAL | DbType.Boolean |
BOOL | DbType.Boolean |
NUMERIC | DbType.Decimal |
DECIMAL | DbType.Decimal |
MONEY | DbType.Decimal |
CURRENCY | DbType.Decimal |
TIME | DbType.DateTime |
DATE | DbType.DateTime |
TIMESTAMP | DbType.DateTime |
DATETIME | DbType.DateTime |
BLOB | DbType.Binary |
BINARY | DbType.Binary |
VARBINARY | DbType.Binary |
IMAGE | DbType.Binary |
GENERAL | DbType.Binary |
OLEOBJECT | DbType.Binary |
GUID | DbType.Guid |
UNIQUEIDENTIFIER | DbType.Guid |
MEMO | DbType.String |
NOTE | DbType.String |
LONGTEXT | DbType.String |
LONGCHAR | DbType.String |
SMALLINT | DbType.Int16 |
BIGINT | DbType.Int64 |
DateTime's are stored in one of two formats. The default datetime format is ISO8601, and you specify the format in the connection string like Finisar does. The varying ISO8601 strings that this class uses to convert are:
"yyyy-MM-dd HH:mm:ss"
The other format is Ticks. In the SQLiteConnection class in the helpfile is a description of all the connectionstring options.
,
"yyyyMMddHHmmss",
"yyyyMMddTHHmmssfffffff",
"yyyy-MM-dd",
"yy-MM-dd",
"yyyyMMdd",
"HH:mm:ss",
"THHmmss"
출처 : http://www.blogbus.com/hyangl-logs/2219450.html
'Developer Gom > C#' 카테고리의 다른 글
x64 Windows 에서 MDB 사용 중 발생했던 문제... (0) | 2012.01.25 |
---|---|
C# 파일경로 정보 얻기 (0) | 2011.07.18 |
DataRow 의 rowID에 접근하는 방법 (0) | 2011.06.24 |
C# 기상 정보 프로그램 (0) | 2011.06.14 |
프로그래밍으로 직접 DataRowState 변경하는 방법 (0) | 2011.05.24 |
'Gom's Rest Room > Music' 카테고리의 다른 글
애니팡 대기실 음악 (0) | 2015.05.16 |
---|---|
[Immediate Music] Electric Romeo (0) | 2013.08.10 |
The Grey - Live or Die (0) | 2012.05.03 |
Monster Hunter Frontier Online - 마이 갤러리 배경음악 (0) | 2011.12.10 |
Neverwinter Nights 2 Sound Track - Temple of Tyr (0) | 2011.10.20 |
'Gom's Rest Room > Music' 카테고리의 다른 글
애니팡 대기실 음악 (0) | 2015.05.16 |
---|---|
Youtube - My heart will go on (Violin Cover by Tylor Davis) (0) | 2014.02.07 |
The Grey - Live or Die (0) | 2012.05.03 |
Monster Hunter Frontier Online - 마이 갤러리 배경음악 (0) | 2011.12.10 |
Neverwinter Nights 2 Sound Track - Temple of Tyr (0) | 2011.10.20 |