<br />
<b>Warning</b>:  Undefined array key "HTTP_ACCEPT_LANGUAGE" in <b>/www/wwwroot/01xj.net/wp-content/plugins/wp-ue/main.php</b> on line <b>13</b><br />
{"id":475,"date":"2014-05-22T23:21:23","date_gmt":"2014-05-22T15:21:23","guid":{"rendered":"http:\/\/www.01xj.net\/?p=475"},"modified":"2014-05-23T05:58:21","modified_gmt":"2014-05-22T21:58:21","slug":"createparameter-%e5%8f%82%e6%95%b0%e6%96%b9%e6%b3%95%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.01xj.net\/?p=475","title":{"rendered":"CreateParameter \u53c2\u6570\u65b9\u6cd5\u8be6\u89e3"},"content":{"rendered":"<p>\u521b\u5efa\u5177\u6709\u6307\u5b9a\u5c5e\u6027\u7684\u65b0\u7684 Parameter \u5bf9\u8c61\u3002<\/p>\n<p>\u8bed\u6cd5<\/p>\n<div>Set parameter = command.CreateParameter (Name, Type, Direction, Size, Value)<\/div>\n<p>&nbsp;<\/p>\n<p>\u4f8b\u5982<\/p>\n<p>&nbsp;<\/p>\n<div>cm.Parameters.Append cm.CreateParameter(&#8220;BH&#8221;, 3, 1,10,rqID)<\/div>\n<p>&nbsp;<\/p>\n<p>\u8fd4\u56de\u503c<\/p>\n<p>\u8fd4\u56de Parameter \u5bf9\u8c61\u3002<br \/>\n\u53c2\u6570<\/p>\n<p>Name<br \/>\n\u53ef\u9009\u3002String \u503c\uff0c\u5305\u542b Parameter \u5bf9\u8c61\u7684\u540d\u79f0\u3002<br \/>\nType<br \/>\n\u53ef\u9009\u3002DataTypeEnum \u503c\uff0c\u6307\u5b9a Parameter \u5bf9\u8c61\u7684\u6570\u636e\u7c7b\u578b\u3002<br \/>\nDirection<br \/>\n\u53ef\u9009\u3002ParameterDirectionEnum \u503c\uff0c\u6307\u5b9a Parameter \u5bf9\u8c61\u7684\u7c7b\u578b\u3002<br \/>\nSize<br \/>\n\u53ef\u9009\u3002Long \u503c\uff0c\u6307\u5b9a\u53c2\u6570\u503c\u7684\u6700\u5927\u957f\u5ea6\uff08\u4ee5\u5b57\u7b26\u6216\u5b57\u8282\u4e3a\u5355\u4f4d\uff09\u3002<br \/>\nValue<br \/>\n\u53ef\u9009\u3002Variant\uff0c\u6307\u5b9a Parameter \u5bf9\u8c61\u7684\u503c\u3002<\/p>\n<p>\u8bf4\u660e<\/p>\n<p>\u4f7f\u7528 CreateParameter \u65b9\u6cd5\u521b\u5efa\u5177\u7528\u6307\u5b9a\u7684\u540d\u79f0\u3001\u7c7b\u578b\u3001\u65b9\u5411\u3001\u5927\u5c0f\u548c\u503c\u7684\u65b0\u7684 Parameter \u5bf9\u8c61\u3002\u5728\u53c2\u6570\u4e2d\u4f20\u9001\u7684\u4efb\u4f55\u503c\u90fd\u5c06\u5199\u5165\u76f8\u5e94\u7684 Parameter \u5c5e\u6027\u3002<\/p>\n<p>\u6b64\u65b9\u6cd5\u4e0d\u4f1a\u5c06 Parameter \u5bf9\u8c61\u81ea\u52a8\u8ffd\u52a0\u5230 Command \u5bf9\u8c61\u7684 Parameters \u96c6\u5408\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u8bbe\u7f6e\u9644\u52a0\u5c5e\u6027\uff0c\u5728\u5c06 Parameter \u5bf9\u8c61\u8ffd\u52a0\u5230\u96c6\u5408\u65f6\uff0cADO \u5c06\u4f7f\u8fd9\u4e9b\u9644\u52a0\u5c5e\u6027\u7684\u503c\u751f\u6548\u3002<\/p>\n<p>\u5982\u679c\u5728 Type \u53c2\u6570\u4e2d\u6307\u5b9a\u53d8\u957f\u6570\u636e\u7c7b\u578b\uff0c\u5728\u5c06\u5176\u8ffd\u52a0\u5230 Parameters \u96c6\u5408\u4e4b\u524d\u5fc5\u987b\u4f20\u9001 Size \u53c2\u6570\u6216\u8005\u8bbe\u7f6e Parameter \u5bf9\u8c61\u7684 Size \u5c5e\u6027\uff1b\u5426\u5219\u5c06\u53d1\u751f\u9519\u8bef\u3002<\/p>\n<p>\u5982\u679c\u5728 Type \u53c2\u6570\u4e2d\u6307\u5b9a\u6570\u5b57\u578b\u6570\u636e\u7c7b\u578b\uff08adNumeric \u6216 adDecimal\uff09\uff0c\u4e5f\u5fc5\u987b\u8bbe\u7f6e NumericScale \u548c Precision \u5c5e\u6027\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u76f8\u5173 \u5c5e\u6027<\/p>\n<p>Type \u5c5e\u6027<\/p>\n<div>\u6307\u793a\u00a0<strong>Parameter<\/strong>\u3001<strong>Field\u00a0<\/strong>\u6216\u00a0<strong>Property\u00a0<\/strong>\u5bf9\u8c61\u7684\u64cd\u4f5c\u7c7b\u578b\u6216\u6570\u636e\u7c7b\u578b\u3002<\/div>\n<div><strong>\u8bbe\u7f6e\u548c\u8fd4\u56de\u503c<\/strong><\/div>\n<p>\u8bbe\u7f6e\u6216\u8fd4\u56de\u4e0b\u5217\u00a0<strong>DataTypeEnum<\/strong>\u00a0\u503c\u4e4b\u4e00\u3002\u76f8\u5e94\u7684 OLE DB \u7c7b\u578b\u6807\u8bc6\u7b26\u5728\u4e0b\u8868\u7684\u8bf4\u660e\u680f\u7684\u62ec\u53f7\u4e2d\u7ed9\u51fa\u3002\u6709\u5173 OLE DB \u6570\u636e\u7c7b\u578b\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u7b2c 10 \u7ae0\u548c\u300aOLE DB \u7a0b\u5e8f\u5458\u53c2\u8003\u300b\u7684\u9644\u5f55 A\u3002<\/p>\n<table border=\"1\" frame=\"below\" rules=\"rows\" cellpadding=\"5\">\n<tbody>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>\u5e38\u91cf<\/strong><\/td>\n<td width=\"70%\"><strong>\u8bf4\u660e<\/strong><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>AdArray<\/strong><\/td>\n<td width=\"70%\">\u4e0e\u5176\u4ed6\u7c7b\u578b\u4e00\u8d77\u52a0\u5165\u903b\u8f91\u00a0<strong>OR<\/strong>\u00a0\u4ee5\u6307\u793a\u8be5\u6570\u636e\u662f\u90a3\u79cd\u7c7b\u578b\u7684\u5b89\u5168\u6570\u7ec4 (DBTYPE_ARRAY)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>AdBigInt<\/strong><\/td>\n<td width=\"70%\">8 \u5b57\u8282\u5e26\u7b26\u53f7\u7684\u6574\u6570 (DBTYPE_I8)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>AdBinary<\/strong><\/td>\n<td width=\"70%\">\u4e8c\u8fdb\u5236\u503c (DBTYPE_BYTES)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>AdBoolean<\/strong><\/td>\n<td width=\"70%\">\u5e03\u5c14\u578b\u503c (DBTYPE_BOOL)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adByRef<\/strong><\/td>\n<td width=\"70%\">\u4e0e\u5176\u4ed6\u7c7b\u578b\u4e00\u8d77\u52a0\u5165\u903b\u8f91\u00a0<strong>OR<\/strong>\u00a0\u4ee5\u6307\u793a\u8be5\u6570\u636e\u662f\u5176\u4ed6\u7c7b\u578b\u6570\u636e\u7684\u6307\u9488 (DBTYPE_BYREF)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adBSTR<\/strong><\/td>\n<td width=\"70%\">\u4ee5\u7a7a\u7ed3\u5c3e\u7684\u5b57\u7b26\u4e32 (Unicode) (DBTYPE_BSTR)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adChar<\/strong><\/td>\n<td width=\"70%\"><strong>\u5b57\u7b26\u4e32<\/strong>\u503c (DBTYPE_STR)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adCurrency<\/strong><\/td>\n<td width=\"70%\">\u8d27\u5e01\u503c (DBTYPE_CY)\u3002\u8d27\u5e01\u6570\u5b57\u7684\u5c0f\u6570\u70b9\u4f4d\u7f6e\u56fa\u5b9a\u3001\u5c0f\u6570\u70b9\u53f3\u4fa7\u6709\u56db\u4f4d\u6570\u5b57\u3002\u8be5\u503c\u4fdd\u5b58\u4e3a 8 \u5b57\u8282\u8303\u56f4\u4e3a 10,000 \u7684\u5e26\u7b26\u53f7\u6574\u578b\u503c\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adDate<\/strong><\/td>\n<td width=\"70%\"><strong>\u65e5\u671f<\/strong>\u503c (DBTYPE_DATE)\u3002\u65e5\u671f\u6309\u53cc\u7cbe\u5ea6\u578b\u6570\u503c\u6765\u4fdd\u5b58\uff0c\u6570\u5b57\u5168\u90e8\u8868\u793a\u4ece 1899 \u5e74 12 \u6708 30 \u5f00\u59cb\u7684\u65e5\u671f\u6570\u3002\u5c0f\u6570\u90e8\u5206\u662f\u4e00\u5929\u5f53\u4e2d\u7684\u7247\u6bb5\u65f6\u95f4\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adDBDate<\/strong><\/td>\n<td width=\"70%\">\u65e5\u671f\u503c (<em>yyyymmdd<\/em>) (DBTYPE_DBDATE)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adDBTime<\/strong><\/td>\n<td width=\"70%\">\u65f6\u95f4\u503c (<em>hhmmss<\/em>) (DBTYPE_DBTIME)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adDBTimeStamp<\/strong><\/td>\n<td width=\"70%\">\u65f6\u95f4\u6233\uff08<em>yyyymmddhhmmss<\/em>\u00a0\u52a0 10 \u4ebf\u5206\u4e4b\u4e00\u7684\u5c0f\u6570\uff09(DBTYPE_DBTIMESTAMP).<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adDecimal<\/strong><\/td>\n<td width=\"70%\">\u5177\u6709\u56fa\u5b9a\u7cbe\u5ea6\u548c\u8303\u56f4\u7684\u7cbe\u786e\u6570\u5b57\u503c (DBTYPE_DECIMAL)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adDouble<\/strong><\/td>\n<td width=\"70%\">\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u503c (DBTYPE_R8)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adEmpty<\/strong><\/td>\n<td width=\"70%\">\u672a\u6307\u5b9a\u503c (DBTYPE_EMPTY)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adError<\/strong><\/td>\n<td width=\"70%\">32 &#8211; \u4f4d\u9519\u8bef\u4ee3\u7801 (DBTYPE_ERROR)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adGUID<\/strong><\/td>\n<td width=\"70%\">\u5168\u5c40\u552f\u4e00\u7684\u6807\u8bc6\u7b26 (GUID) (DBTYPE_GUID)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adIDispatch<\/strong><\/td>\n<td width=\"70%\">OLE \u5bf9\u8c61\u4e0a\u00a0<strong>Idispatch<\/strong>\u00a0\u63a5\u53e3\u7684\u6307\u9488 (DBTYPE_IDISPATCH)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adInteger<\/strong><\/td>\n<td width=\"70%\">4 \u5b57\u8282\u7684\u5e26\u7b26\u53f7\u6574\u578b (DBTYPE_I4)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adIUnknown<\/strong><\/td>\n<td width=\"70%\">OLE \u5bf9\u8c61\u4e0a\u00a0<strong>IUnknown<\/strong>\u00a0\u63a5\u53e3\u7684\u6307\u9488 (DBTYPE_IUNKNOWN)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adLongVarBinary<\/strong><\/td>\n<td width=\"70%\">\u957f\u4e8c\u8fdb\u5236\u503c\uff08\u4ec5\u7528\u4e8e\u00a0<strong>Parameter<\/strong>\u00a0\u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adLongVarChar<\/strong><\/td>\n<td width=\"70%\">\u957f<strong>\u5b57\u7b26\u4e32<\/strong>\u503c\uff08\u4ec5\u7528\u4e8e\u00a0<strong>Parameter<\/strong>\u00a0\u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adLongVarWChar<\/strong><\/td>\n<td width=\"70%\">\u4ee5\u7a7a\u7ed3\u5c3e\u7684\u957f\u5b57\u7b26\u4e32\u503c\uff08\u4ec5\u7528\u4e8e\u00a0<strong>Parameter\u00a0<\/strong>\u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adNumeric<\/strong><\/td>\n<td width=\"70%\">\u5177\u6709\u56fa\u5b9a\u7cbe\u5ea6\u548c\u8303\u56f4\u7684\u7cbe\u786e\u6570\u5b57\u503c (DBTYPE_NUMERIC)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adSingle<\/strong><\/td>\n<td width=\"70%\">\u5355\u7cbe\u5ea6\u6d6e\u70b9\u503c (DBTYPE_R4)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adSmallInt<\/strong><\/td>\n<td width=\"70%\">2 \u5b57\u8282\u5e26\u7b26\u53f7\u6574\u578b (DBTYPE_I2)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adTinyInt<\/strong><\/td>\n<td width=\"70%\">1 \u5b57\u8282\u5e26\u7b26\u53f7\u6574\u578b (DBTYPE_I1)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adUnsignedBigInt<\/strong><\/td>\n<td width=\"70%\">8 \u5b57\u8282\u4e0d\u5e26\u7b26\u53f7\u6574\u578b (DBTYPE_UI8)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adUnsignedInt<\/strong><\/td>\n<td width=\"70%\">4 \u5b57\u8282\u4e0d\u5e26\u7b26\u53f7\u6574\u578b (DBTYPE_UI4)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adUnsignedSmallInt<\/strong><\/td>\n<td width=\"70%\">2 \u5b57\u8282\u4e0d\u5e26\u7b26\u53f7\u6574\u578b (DBTYPE_UI2)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adUnsignedTinyInt<\/strong><\/td>\n<td width=\"70%\">1 \u5b57\u8282\u4e0d\u5e26\u7b26\u53f7\u6574\u578b (DBTYPE_UI1)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adUserDefined<\/strong><\/td>\n<td width=\"70%\">\u7528\u6237\u5b9a\u4e49\u7684\u53d8\u91cf (DBTYPE_UDT)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adVarBinary<\/strong><\/td>\n<td width=\"70%\">\u4e8c\u8fdb\u5236\u503c\uff08\u4ec5\u00a0<strong>Parameter<\/strong>\u00a0\u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adVarChar<\/strong><\/td>\n<td width=\"70%\"><strong>\u5b57\u7b26\u4e32<\/strong>\u503c\uff08\u4ec5\u00a0<strong>Parameter<\/strong>\u00a0\u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adVariant<\/strong><\/td>\n<td width=\"70%\">\u81ea\u52a8<strong>\u53d8\u4f53\u578b<\/strong>\u00a0(DBTYPE_VARIANT)\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adVector<\/strong><\/td>\n<td width=\"70%\">\u4e0e\u5176\u4ed6\u7c7b\u578b\u4e00\u8d77\u52a0\u5165\u903b\u8f91\u00a0<strong>OR<\/strong>\u00a0\u4e2d\uff0c\u6307\u793a\u6570\u636e\u662f DBVECTOR \u7ed3\u6784\uff08\u7531 OLE DB \u5b9a\u4e49\uff09\u3002\u8be5\u7ed3\u6784\u542b\u6709\u5143\u7d20\u7684\u8ba1\u6570\u548c\u5176\u4ed6\u7c7b\u578b (DBTYPE_VECTOR) \u6570\u636e\u7684\u6307\u9488\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adVarWChar<\/strong><\/td>\n<td width=\"70%\">\u4ee5\u7a7a\u7ed3\u5c3e\u7684 Unicode \u5b57\u7b26\u4e32\uff08\u4ec5\u00a0<strong>Parameter<\/strong>\u00a0\u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"30%\"><strong>adWChar<\/strong><\/td>\n<td width=\"70%\">\u4ee5\u7a7a\u7ed3\u5c3e\u7684 Unicode \u5b57\u7b26\u4e32 (DBTYPE_WSTR)\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<div><strong>\u8bf4\u660e<\/strong><\/div>\n<div>\u5bf9\u00a0<strong>Parameter<\/strong>\u00a0\u5bf9\u8c61\uff0c<strong>Type<\/strong>\u00a0\u5c5e\u6027\u662f\u8bfb\/\u5199\u3002\u5bf9\u5176\u4ed6\u6240\u6709\u5bf9\u8c61\uff0c<strong>Type<\/strong>\u00a0\u5c5e\u6027\u662f\u53ea\u8bfb\u3002<\/div>\n<p>&nbsp;<\/p>\n<p>Direction \u5c5e\u6027<\/p>\n<p>\u6307\u793a Parameter \u6240\u6807\u660e\u7684\u662f\u8f93\u5165\u53c2\u6570\u3001\u8f93\u51fa\u53c2\u6570\u8fd8\u662f\u65e2\u662f\u8f93\u51fa\u53c8\u662f\u8f93\u5165\u53c2\u6570\uff0c\u6216\u8be5\u53c2\u6570\u662f\u5426\u4e3a\u5b58\u50a8\u8fc7\u7a0b\u8fd4\u56de\u7684\u503c\u3002<\/p>\n<p>\u8bbe\u7f6e\u548c\u8fd4\u56de\u503c<\/p>\n<p>\u8bbe\u7f6e\u6216\u8fd4\u56de\u4ee5\u4e0b\u67d0\u4e2a ParameterDirectionEnum \u503c\u3002<\/p>\n<table border=\"1\" frame=\"below\" rules=\"rows\" cellpadding=\"5\">\n<tbody>\n<tr valign=\"top\">\n<td width=\"33%\"><strong>\u5e38\u91cf<\/strong><\/td>\n<td width=\"67%\"><strong>\u8bf4\u660e<\/strong><\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"33%\"><strong>AdParamUnknown<\/strong><\/td>\n<td width=\"67%\">\u6307\u793a\u53c2\u6570\u65b9\u5411\u672a\u77e5\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"33%\"><strong>AdParamInput<\/strong><\/td>\n<td width=\"67%\">\u9ed8\u8ba4\u503c\u3002\u6307\u793a\u8f93\u5165\u53c2\u6570\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"33%\"><strong>AdParamOutput<\/strong><\/td>\n<td width=\"67%\">\u6307\u793a\u8f93\u51fa\u53c2\u6570\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"33%\"><strong>AdParamInputOutput<\/strong><\/td>\n<td width=\"67%\">\u540c\u65f6\u6307\u793a\u8f93\u5165\u53c2\u6570\u548c\u8f93\u51fa\u53c2\u6570\u3002<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"33%\"><strong>AdParamReturnValue<\/strong><\/td>\n<td width=\"67%\">\u6307\u793a\u8fd4\u56de\u503c\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8bf4\u660e<\/p>\n<p>\u4f7f\u7528 Direction \u5c5e\u6027\u53ef\u6307\u5b9a\u5411\u8fc7\u7a0b\u4f20\u9012\u53c2\u6570\u6216\u4ece\u8fc7\u7a0b\u4f20\u9012\u53c2\u6570\u7684\u65b9\u5f0f\u3002Direction \u5c5e\u6027\u4e3a\u8bfb\/\u5199\uff1b\u8be5\u5c5e\u6027\u5141\u8bb8\u4f7f\u7528\u4e0d\u8fd4\u56de\u8be5\u4fe1\u606f\u7684\u63d0\u4f9b\u8005\uff0c\u6216\u8005\u5728\u4e0d\u5e0c\u671b ADO \u4e3a\u4e86\u83b7\u53d6\u53c2\u6570\u4fe1\u606f\u800c\u9644\u52a0\u8c03\u7528\u63d0\u4f9b\u8005\u65f6\u8bbe\u7f6e\u8be5\u4fe1\u606f\u3002<\/p>\n<p>\u5e76\u975e\u6240\u6709\u7684\u63d0\u4f9b\u8005\u90fd\u53ef\u4ee5\u5728\u5176\u5b58\u50a8\u8fc7\u7a0b\u4e2d\u786e\u5b9a\u53c2\u6570\u65b9\u5411\u3002\u5728\u6b64\u60c5\u51b5\u4e0b\uff0c\u5728\u6267\u884c\u67e5\u8be2\u524d\u5fc5\u987b\u8bbe\u7f6e Direction \u5c5e\u6027\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>Size \u5c5e\u6027<\/p>\n<p>\u8868\u793a Parameter \u5bf9\u8c61\u7684\u6700\u5927\u5927\u5c0f\uff08\u6309\u5b57\u8282\u6216\u5b57\u7b26\uff09\u3002<\/p>\n<p>\u8bbe\u7f6e\u548c\u8fd4\u56de\u6570\u503c<\/p>\n<p>\u8bbe\u7f6e\u6216\u8fd4\u56de\u8868\u793a Parameter \u5bf9\u8c61\u7684\u6700\u5927\u5927\u5c0f\uff08\u6309\u5b57\u8282\u6216\u5b57\u7b26\uff09\u7684\u957f\u6574\u578b\u503c\u3002<\/p>\n<p>\u8bf4\u660e<\/p>\n<p>\u4f7f\u7528 Size \u5c5e\u6027\u786e\u5b9a\u5bf9 Parameter \u5bf9\u8c61\u7684 Value \u5c5e\u6027\u5199\u5165\uff08\u6216\u8bfb\u51fa\uff09\u503c\u7684\u6700\u5927\u5927\u5c0f\u3002Size \u5c5e\u6027\u4e3a\u53ef\u8bfb\/\u5199\u3002<\/p>\n<p>\u5982\u679c\u8981\u6307\u5b9a Parameter \u5bf9\u8c61\u4e3a\u53d8\u957f\u6570\u636e\u7c7b\u578b\uff08\u4f8b\u5982\u4efb\u4f55\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5982 adVarChar\uff09\uff0c\u5219\u5fc5\u987b\u5148\u8bbe\u7f6e\u5bf9\u8c61\u7684 Size \u5c5e\u6027\uff0c\u7136\u540e\u518d\u5c06\u8be5\u5bf9\u8c61\u8ffd\u52a0\u5230 Parameters \u96c6\u5408\u3002\u5426\u5219\uff0c\u5c06\u4f1a\u51fa\u73b0\u9519\u8bef\u3002<\/p>\n<p>\u5982\u679c\u5df2\u7ecf\u5c06 Parameter \u5bf9\u8c61\u8ffd\u52a0\u5230 Command \u5bf9\u8c61\u7684 Parameter \u96c6\u5408\uff0c\u5e76\u5df2\u7ecf\u5c06\u5b83\u7684\u7c7b\u578b\u66f4\u6539\u4e3a\u53d8\u957f\u6570\u636e\u7c7b\u578b\uff0c\u90a3\u4e48\u5fc5\u987b\u5148\u8bbe\u7f6e Parameter \u5bf9\u8c61\u7684 Size \u5c5e\u6027\u7136\u540e\u518d\u6267\u884c Command \u5bf9\u8c61\u3002\u5426\u5219\uff0c\u5c06\u51fa\u73b0\u9519\u8bef\u3002<\/p>\n<p>\u5982\u679c\u4f7f\u7528 Refresh \u65b9\u6cd5\u4ece\u63d0\u4f9b\u8005\u83b7\u53d6\u53c2\u6570\u4fe1\u606f\uff0c\u5e76\u4e14\u5b83\u8fd4\u56de\u4e00\u4e2a\u6216\u591a\u4e2a\u53d8\u957f\u6570\u636e\u7c7b\u578b Parameter \u5bf9\u8c61\uff0cADO \u53ef\u80fd\u4f1a\u6839\u636e\u5176\u6700\u5927\u53ef\u80fd\u7684\u5927\u5c0f\u4e3a\u5176\u5206\u914d\u5185\u5b58\u7a7a\u95f4\uff0c\u8fd9\u6837\u5728\u6267\u884c\u4e2d\u53ef\u80fd\u4f1a\u5bfc\u81f4\u9519\u8bef\u3002\u4e3a\u907f\u514d\u51fa\u9519\uff0c\u5e94\u8be5\u5728\u6267\u884c\u547d\u4ee4\u4e4b\u524d\u663e\u5f0f\u8bbe\u7f6e\u8fd9\u4e9b\u53c2\u6570\u7684 Size \u5c5e\u6027\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h1>DataTypeEnum\u503c<\/h1>\n<p>\u89c4\u5b9a Field, Parameter \u6216 Property \u5bf9\u8c61\u7684\u6570\u636e\u7c7b\u578b\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<th>\u5e38\u91cf<\/th>\n<th>\u503c<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td>adEmpty<\/td>\n<td>0<\/td>\n<td>\u6ca1\u6709\u503c (DBTYPE_EMPTY)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adSmallInt<\/td>\n<td>2<\/td>\n<td>\u4e00\u4e2a\u53cc\u5b57\u8282\u7684\u6709\u7b26\u53f7\u6574\u6570 (DBTYPE_I2)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adInteger<\/td>\n<td>3<\/td>\n<td>\u4e00\u4e2a\u56db\u5b57\u8282\u7684\u6709\u7b26\u53f7\u6574\u6570 (DBTYPE_I4)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adSingle<\/td>\n<td>4<\/td>\n<td>\u4e00\u4e2a\u5355\u7cbe\u5ea6\u6d6e\u70b9\u503c (DBTYPE_R4)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adDouble<\/td>\n<td>5<\/td>\n<td>\u4e00\u4e2a\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u503c (DBTYPE_R8)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adCurrency<\/td>\n<td>6<\/td>\n<td>\u4e00\u4e2a\u8d27\u5e01\u503c (DBTYPE_CY)\u3002\u8d27\u5e01\u662f\u4e00\u4e2a\u5b9a\u70b9\u6570\u5b57\uff0c\u5c0f\u6570\u70b9\u53f3\u4fa7\u6709\u56db\u4f4d\u6570\u5b57\u3002\u8be5\u503c\u5b58\u50a8\u4e3a\u516b\u5b57\u8282\u3001\u8303\u56f4\u4e3a 10,000 \u7684\u6709\u7b26\u53f7\u6574\u6570\u3002<\/td>\n<\/tr>\n<tr>\n<td>adDate<\/td>\n<td>7<\/td>\n<td>\u65e5\u671f\u503c (DBTYPE_DATE)\u3002\u65e5\u671f\u4fdd\u5b58\u4e3a\u53cc\u7cbe\u5ea6\u6570\uff0c\u6570\u5b57\u7684\u6574\u6570\u90e8\u5206\u662f\u4ece 1899 \u5e74 12 \u6708 30 \u65e5\u7b97\u8d77\u7684\u5929\u6570\uff0c\u5c0f\u6570\u90e8\u5206\u662f\u4e00\u5929\u5f53\u4e2d\u7684\u7247\u6bb5\u65f6\u95f4\u3002<\/td>\n<\/tr>\n<tr>\n<td>adBSTR<\/td>\n<td>8<\/td>\n<td>\u4ee5 Null \u7ec8\u6b62\u7684\u5b57\u7b26\u4e32 (Unicode) (DBTYPE_BSTR)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adIDispatch<\/td>\n<td>9<\/td>\n<td>\u6307\u5411 COM \u5bf9\u8c61\u4e0a IDispatch \u63a5\u53e3\u7684\u6307\u9488 (DBTYPE_IDISPATCH)\u3002<\/p>\n<p>\u6ce8\u610f:ADO \u76ee\u524d\u4e0d\u652f\u6301\u8fd9\u79cd\u6570\u636e\u7c7b\u578b\u3002\u4f7f\u7528\u5b83\u53ef\u80fd\u5bfc\u81f4\u4e0d\u53ef\u9884\u6599\u7684\u7ed3\u679c\u3002<\/td>\n<\/tr>\n<tr>\n<td>adError<\/td>\n<td>10<\/td>\n<td>\u4e00\u4e2a 32 \u4f4d\u7684\u9519\u8bef\u4ee3\u7801 (DBTYPE_ERROR)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adBoolean<\/td>\n<td>11<\/td>\n<td>\u4e00\u4e2a\u5e03\u5c14\u503c (DBTYPE_BOOL)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adVariant<\/td>\n<td>12<\/td>\n<td>\u4e00\u4e2a Automation Variant (DBTYPE_VARIANT)\u3002<\/p>\n<p>\u6ce8\u610f:ADO \u76ee\u524d\u4e0d\u652f\u6301\u8fd9\u79cd\u6570\u636e\u7c7b\u578b\u3002\u4f7f\u7528\u5b83\u53ef\u80fd\u5bfc\u81f4\u4e0d\u53ef\u9884\u6599\u7684\u7ed3\u679c\u3002<\/td>\n<\/tr>\n<tr>\n<td>adIUnknown<\/td>\n<td>13<\/td>\n<td>\u6307\u5411 COM \u5bf9\u8c61\u4e0a IUnknown \u63a5\u53e3\u7684\u6307\u9488 (DBTYPE_IUNKNOWN)\u3002<\/p>\n<p>\u6ce8\u610f:ADO \u76ee\u524d\u4e0d\u652f\u6301\u8fd9\u79cd\u6570\u636e\u7c7b\u578b\u3002\u4f7f\u7528\u5b83\u53ef\u80fd\u5bfc\u81f4\u4e0d\u53ef\u9884\u6599\u7684\u7ed3\u679c\u3002<\/td>\n<\/tr>\n<tr>\n<td>adDecimal<\/td>\n<td>14<\/td>\n<td>\u5177\u6709\u56fa\u5b9a\u7cbe\u5ea6\u548c\u8303\u56f4\u7684\u786e\u5207\u6570\u5b57\u503c (DBTYPE_DECIMAL)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adTinyInt<\/td>\n<td>16<\/td>\n<td>\u4e00\u4e2a\u5355\u5b57\u8282\u7684\u6709\u7b26\u53f7\u6574\u6570 (DBTYPE_I1)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adUnsignedTinyInt<\/td>\n<td>17<\/td>\n<td>\u4e00\u4e2a\u5355\u5b57\u8282\u7684\u65e0\u7b26\u53f7\u6574\u6570 (DBTYPE_UI1)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adUnsignedSmallInt<\/td>\n<td>18<\/td>\n<td>\u4e00\u4e2a\u53cc\u5b57\u8282\u7684\u65e0\u7b26\u53f7\u6574\u6570 (DBTYPE_UI2)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adUnsignedInt<\/td>\n<td>19<\/td>\n<td>\u4e00\u4e2a\u56db\u5b57\u8282\u7684\u65e0\u7b26\u53f7\u6574\u6570 (DBTYPE_UI4)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adBigInt<\/td>\n<td>20<\/td>\n<td>\u4e00\u4e2a\u516b\u5b57\u8282\u7684\u6709\u7b26\u53f7\u6574\u6570 (DBTYPE_I8)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adUnsignedBigInt<\/td>\n<td>21<\/td>\n<td>\u4e00\u4e2a\u516b\u5b57\u8282\u7684\u65e0\u7b26\u53f7\u6574\u6570 (DBTYPE_UI8)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adFileTime<\/td>\n<td>64<\/td>\n<td>\u4e00\u4e2a 64 \u4f4d\u7684\u503c\uff0c\u8868\u793a\u4ece 1601 \u5e74 1 \u6708 1 \u65e5\u5f00\u59cb\u7684 100 \u4e2a\u5341\u4ebf\u5206\u4e4b\u4e00\u79d2\u95f4\u9694\u7684\u6570\u91cf (DBTYPE_FILETIME)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adGUID<\/td>\n<td>72<\/td>\n<td>\u5168\u5c40\u552f\u4e00\u6807\u8bc6\u7b26 (GUID) (DBTYPE_GUID)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adBinary<\/td>\n<td>128<\/td>\n<td>\u4e00\u4e2a\u4e8c\u8fdb\u5236\u503c (DBTYPE_BYTES)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adChar<\/td>\n<td>129<\/td>\n<td>\u4e00\u4e2a\u5b57\u7b26\u4e32\u503c (DBTYPE_STR)\u3002.<\/td>\n<\/tr>\n<tr>\n<td>adWChar<\/td>\n<td>130<\/td>\n<td>\u4e00\u4e2a\u4ee5 Null \u7ec8\u6b62\u7684 Unicode \u5b57\u7b26\u4e32 (DBTYPE_WSTR)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adNumeric<\/td>\n<td>131<\/td>\n<td>\u5177\u6709\u56fa\u5b9a\u7cbe\u5ea6\u548c\u8303\u56f4\u7684\u786e\u5207\u6570\u5b57\u503c (DBTYPE_NUMERIC)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adUserDefined<\/td>\n<td>132<\/td>\n<td>\u4e00\u4e2a\u7528\u6237\u5b9a\u4e49\u7684\u53d8\u91cf (DBTYPE_UDT)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adDBDate<\/td>\n<td>133<\/td>\n<td>\u65e5\u671f\u503c (yyyymmdd) (DBTYPE_DBDATE)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adDBTime<\/td>\n<td>134<\/td>\n<td>\u65f6\u95f4\u503c (hhmmss) (DBTYPE_DBTIME)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adDBTimeStamp<\/td>\n<td>135<\/td>\n<td>\u65e5\u671f\/\u65f6\u95f4\u6233\uff08yyyymmddhhmmss \u52a0\u5341\u4ebf\u5206\u4e4b\u4e00\u7684\u5c0f\u6570\uff09(DBTYPE_DBTIMESTAMP)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adChapter<\/td>\n<td>136<\/td>\n<td>\u4e00\u4e2a\u56db\u5b57\u8282\u7684\u5b50\u96c6\u503c\uff0c\u6807\u8bc6\u5b50\u884c\u96c6\u5408\u4e2d\u7684\u884c (DBTYPE_HCHAPTER)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adPropVariant<\/td>\n<td>138<\/td>\n<td>\u4e00\u4e2a Automation PROPVARIANT (DBTYPE_PROP_VARIANT)\u3002<\/td>\n<\/tr>\n<tr>\n<td>adVarNumeric<\/td>\n<td>139<\/td>\n<td>\u4e00\u4e2a\u6570\u5b57\u503c\uff08\u4ec5\u9650\u4e8e Parameter \u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>adVarChar<\/td>\n<td>200<\/td>\n<td>\u4e00\u4e2a\u5b57\u7b26\u4e32\u503c\uff08\u4ec5\u9650\u4e8e Parameter \u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>adLongVarChar<\/td>\n<td>201<\/td>\n<td>\u4e00\u4e2a\u957f\u5b57\u7b26\u4e32\u503c\uff08\u4ec5\u9650\u4e8e Parameter \u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>adVarWChar<\/td>\n<td>202<\/td>\n<td>\u4e00\u4e2a\u4ee5 Null \u7ec8\u6b62\u7684 Unicode \u5b57\u7b26\u4e32\uff08\u4ec5\u9650\u4e8e Parameter \u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>adLongVarWChar<\/td>\n<td>203<\/td>\n<td>\u4e00\u4e2a\u4ee5 Null \u7ec8\u6b62\u7684\u957f Unicode \u5b57\u7b26\u4e32\u503c\uff08\u4ec5\u9650\u4e8e Parameter \u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>adVarBinary<\/td>\n<td>204<\/td>\n<td>\u4e00\u4e2a\u4e8c\u8fdb\u5236\u503c\uff08\u4ec5\u9650\u4e8e Parameter \u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>adLongVarBinary<\/td>\n<td>205<\/td>\n<td>\u4e00\u4e2a\u957f\u4e8c\u8fdb\u5236\u503c\uff08\u4ec5\u9650\u4e8e Parameter \u5bf9\u8c61\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>AdArray<\/td>\n<td>0x2000<\/td>\n<td>\u4e00\u4e2a\u6807\u5fd7\u503c\uff0c\u901a\u5e38\u4e0e\u53e6\u4e00\u4e2a\u6570\u636e\u7c7b\u578b\u5e38\u91cf\u7ec4\u5408\uff0c\u6307\u793a\u8be5\u6570\u636e\u7c7b\u578b\u7684\u6570\u7ec4\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u521b\u5efa\u5177\u6709\u6307\u5b9a\u5c5e\u6027\u7684\u65b0\u7684 Parameter \u5bf9\u8c61\u3002 \u8bed\u6cd5 Set p&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-475","post","type-post","status-publish","format-standard","hentry","category-6"],"_links":{"self":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=475"}],"version-history":[{"count":2,"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts\/475\/revisions"}],"predecessor-version":[{"id":477,"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts\/475\/revisions\/477"}],"wp:attachment":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}