Data PRovider | Parameter format |
sqlclient | @parametername |
oledb | ? mark |
odbc | ? mark |
Oracleclient | : parametername |
各种数据库参数是不同的,如上表格为对应关系
.net framework type | dbtype | sqldbtype | oledbtype | odbctype | oracletype |
Boolean | Boolean | bit | boolean | bit | byte |
byte | byte | tinyint | unsignedtinyint | tinyint | byte |
char | char | char | char | ||
datetime | datetime | datetime | datetimestamp | datetime | datetime |
decimal | decimal | decimal | decimal | numeric | number |
double | double | float | double | double | double |
single | single | real | single | real | float |
guid | guid | uniqueidentifier | guid | uniqueidentifier | raw |
int16 | int16 | smallint | smallint | smallint | int16 |
int32 | int32 | int | int | int | int32 |
int64 | int64 | bigint | bigint | bigint | number |
string | string | nvarchar(max 4000) | varwchar | nvarchar | nvarchar |
更详细对比请看如下链接
新闻热点
疑难解答
图片精选