复制代码 代码如下:
OleDbParameter parm = new OleDbParameter(Name
(实际上它有七重载大家具体大家可以在里面就可以看到)
参数
Name 可选
Type 可选
Direction 可选
Size 可选
Value 可选
以下是实例
sql=
//注意查询的条件均用?号表示
OleDbConnection conn = new OleDbConnection(connString);
OleDbCommand cmd = new OleDbCommand(sql
OleDbParameter parm = new OleDbParameter(
//temp为Parameter对象可随便定义
parm
//指定其类型输入参数
cmd
cmd
//查询tsing
conn
cmd
复制代码 代码如下:
Set parameter = command
参数同上
以下是实例
et conn = Server
conn
conn
set mycmd = Server
mycmd
mycmd
mycmd
set mypar = mycmd
mycmd
set myrs = mycmd
复制代码 代码如下:
Const adParamUnknown =
Const adParamInput =
Const adParamOutput =
Const adParamInputOutput =
Const adParamReturnValue =
Const adEmpty =
Const adTinyInt =
Const adSmallInt =
Const adInteger =
Const adBigInt =
Const adUnsignedTinyInt =
Const adUnsignedSmallInt =
Const adUnsignedInt =
Const adUnsignedBigInt =
Const adSingle =
Const adDouble =
Const adCurrency =
Const adDecimal =
Const adNumeric =
Const adBoolean =
Const adError =
Const adUserDefined =
Const adVariant =
Const adIDispatch =
Const adIUnknown =
Const adGUID =
Const adDate =
Const adDBDate =
Const adDBTime =
Const adDBTimeStamp =
Const adBSTR =
Const adChar =
Const adVarChar =
Const adLongVarChar =
Const adWChar =
Const adVarWChar =
Const adLongVarWChar =
Const adBinary =
Const adVarBinary =
Const adLongVarBinary =