{"id":6086,"date":"2017-09-05T12:48:36","date_gmt":"2017-09-05T03:48:36","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=6086"},"modified":"2017-09-05T12:55:46","modified_gmt":"2017-09-05T03:55:46","slug":"adofieldobject","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/adofieldobject\/","title":{"rendered":"\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\uff08ADO\uff09Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8"},"content":{"rendered":"<h2>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/h2>\n<div class=\"m30-l\">\n<p><strong>Recordset \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u5185\u306e\u5217\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\uff09\u3092\u8868\u3059\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<strong>Recordset \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u5185\u306e\u5217\u5168\u4f53\u3092\u8868\u3059 <strong>Fields \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong> \u306b\u95a2\u3057\u3066\u306e\u8a73\u7d30\u306f\u3001<a href=\"https:\/\/excelwork.info\/excel\/adofieldscollection\/\">\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\uff08ADO\uff09Fields \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/a> \u3092\u53c2\u7167\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<br \/>\n<h3>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Fields<\/strong>[.<strong>Item<\/strong>](<em>index<\/em>)<br \/>\n    <em>object<\/em>.<strong>Fields<\/strong>[.<strong>Item<\/strong>](&#8220;<em>name<\/em>&#8220;)<br \/>\n    <em>object<\/em>(<em>index<\/em>)<br \/>\n    <em>object<\/em>(&#8220;<em>name<\/em>&#8220;)<br \/>\n    <em>object<\/em>![<em>name<\/em>]<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Recordset \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>index&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\uff080 \u304b\u3089\u59cb\u307e\u308b\u6574\u6570\u5024\uff09\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>name&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5217\u540d\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\uff09\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u5217\u540d\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\uff09\u3092\u53d6\u5f97\u3059\u308b\uff08Name \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Name<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>\u623b\u308a\u5024&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b<strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u306e\u540d\u524d\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\uff09\u3092\u8868\u3059\u6587\u5b57\u5217\u578b\uff08String\uff09\u306e\u5024<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u30d5\u30a3\u30fc\u30eb\u30c9\u5185\u306e\u30ec\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\uff08Value \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>[.<strong>Value<\/strong>]<\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u8a2d\u5b9a\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>[.<strong>Value<\/strong>] = <em>field_value<\/em><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>field_value&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b\u5217\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\uff09\u306e\u30c7\u30fc\u30bf\uff08\u30ec\u30b3\u30fc\u30c9\uff09\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>\u623b\u308a\u5024&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b\u5217\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\uff09\u306e\u30c7\u30fc\u30bf\uff08\u30ec\u30b3\u30fc\u30c9\uff09\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Value \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306f\u3001<strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u306e\u65e2\u5b9a\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<h3>\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u57fa\u672c\u7279\u6027\u3092\u53d6\u5f97\uff08Type \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbPrecision \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbNumericScale \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Precision<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>NumericScale<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Type<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Precision \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306e\u623b\u308a\u5024\u3000\u2026\u3000<strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3067\u4f7f\u7528\u3055\u308c\u308b\u6570\u5024\u306e\u6700\u5927\u6841\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p class=\"caution4\"><strong>NumericScale \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306e\u623b\u308a\u5024\u3000\u2026\u3000<strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3067\u4f7f\u7528\u3055\u308c\u308b\u6570\u5024\u306e\u5c0f\u6570\u70b9\u4ee5\u4e0b\u306e\u6841\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p class=\"caution4\"><strong>Type \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306e\u623b\u308a\u5024\u3000\u2026\u3000<strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u306e\u30c7\u30fc\u30bf\u578b\uff08<strong>DataTypeEnum \u578b<\/strong>\u306e\u5024\uff09\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<table>\n<tr>\n<td align = \"center\" width=\"200\" bgcolor=\"#fffccc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"50\" bgcolor=\"#fffccc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"400\" bgcolor=\"#fffccc\"><strong>\u8aac\u660e<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adArray<br \/>\n(ADOX \u306b\u306f\u9069\u7528\u305b\u305a\u3002)<\/td>\n<td align = \"center\" width=\"50\">0x2000<\/td>\n<td width=\"400\">\u5e38\u306b\u5225\u306e\u30c7\u30fc\u30bf\u578b\u5b9a\u6570\u3068\u7d44\u307f\u5408\u308f\u3055\u308c\u3001\u305d\u306e\u30c7\u30fc\u30bf\u578b\u306e\u914d\u5217\u3092\u793a\u3059\u30d5\u30e9\u30b0\u5024\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adBigInt<\/td>\n<td align = \"center\" width=\"50\">20<\/td>\n<td width=\"400\">8 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u4ed8\u304d\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I8)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adBinary<\/td>\n<td align = \"center\" width=\"50\">128<\/td>\n<td width=\"400\">\u30d0\u30a4\u30ca\u30ea\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_BYTES)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adBoolean<\/td>\n<td align = \"center\" width=\"50\">11<\/td>\n<td width=\"400\">\u30d6\u30fc\u30eb\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_BYTES)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adBSTR<\/td>\n<td align = \"center\" width=\"50\">8<\/td>\n<td width=\"400\">Null \u3067\u7d42\u4e86\u3059\u308b Unicode \u6587\u5b57\u5217\u3092\u793a\u3057\u307e\u3059 (DBTYPE_BSTR)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adChapter<\/td>\n<td align = \"center\" width=\"50\">136<\/td>\n<td width=\"400\">\u5b50\u884c\u30bb\u30c3\u30c8\u306e\u884c\u3092\u8b58\u5225\u3059\u308b 4 \u30d0\u30a4\u30c8 \u30c1\u30e3\u30d7\u30bf\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_HCHAPTER)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adChar<\/td>\n<td align = \"center\" width=\"50\">129<\/td>\n<td width=\"400\">\u6587\u5b57\u5217\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_STR)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adCurrency<\/td>\n<td align = \"center\" width=\"50\">6<\/td>\n<td width=\"400\">\u901a\u8ca8\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_CY)\u3002\u901a\u8ca8\u578b\u306f\u5c0f\u6570\u70b9\u4ee5\u4e0b 4 \u6841\u306e\u56fa\u5b9a\u5c0f\u6570\u70b9\u306e\u6570\u5024\u3067\u3059\u3002\u30b9\u30b1\u30fc\u30eb\u304c 10,000 \u306e\u30018 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u4ed8\u304d\u6574\u6570\u3067\u683c\u7d0d\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adDate<\/td>\n<td align = \"center\" width=\"50\">7<\/td>\n<td width=\"400\">\u65e5\u4ed8\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_DATE)\u3002\u65e5\u4ed8\u578b\u306f\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u578b (Double) \u3067\u683c\u7d0d\u3055\u308c\u3001\u6574\u6570\u90e8\u5206\u306f 1899 \u5e74 12 \u6708 30 \u65e5\u304b\u3089\u306e\u65e5\u6570\u3092\u3001\u5206\u6570\u90e8\u5206\u306f\u65e5\u6570\u306e\u5206\u6570\u3092\u8868\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adDBDate<\/td>\n<td align = \"center\" width=\"50\">133<\/td>\n<td width=\"400\">\u65e5\u4ed8\u5024 (yyyymmdd) \u3092\u793a\u3057\u307e\u3059 (DBTYPE_DBDATE)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adDBTime<\/td>\n<td align = \"center\" width=\"50\">134<\/td>\n<td width=\"400\">\u6642\u523b\u5024 (hhmmss) \u3092\u793a\u3057\u307e\u3059 (DBTYPE_DBTIME)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adDBTimeStamp<\/td>\n<td align = \"center\" width=\"50\">135<\/td>\n<td width=\"400\">\u65e5\u4ed8\/\u6642\u523b\u30b9\u30bf\u30f3\u30d7 (yyyymmddhhmmss \u304a\u3088\u3073 10 \u5104\u5206\u306e 1 \u6841\u307e\u3067\u306e\u5206\u6570) \u3092\u793a\u3057\u307e\u3059 (DBTYPE_DBTIMESTAMP)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adDecimal<\/td>\n<td align = \"center\" width=\"50\">14<\/td>\n<td width=\"400\">\u56fa\u5b9a\u7cbe\u5ea6\u304a\u3088\u3073\u30b9\u30b1\u30fc\u30eb\u306e\u6b63\u78ba\u306a\u6570\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_DECIMAL)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adDouble<\/td>\n<td align = \"center\" width=\"50\">5<\/td>\n<td width=\"400\">\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_R8)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adEmpty<\/td>\n<td align = \"center\" width=\"50\">0<\/td>\n<td width=\"400\">\u5024\u3092\u6307\u5b9a\u3057\u307e\u305b\u3093 (DBTYPE_EMPTY)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adError<\/td>\n<td align = \"center\" width=\"50\">10<\/td>\n<td width=\"400\">32 \u30d3\u30c3\u30c8 \u30a8\u30e9\u30fc \u30b3\u30fc\u30c9\u3092\u793a\u3057\u307e\u3059 (DBTYPE_ERROR)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adFileTime<\/td>\n<td align = \"center\" width=\"50\">64<\/td>\n<td width=\"400\">1601 \u5e74 1 \u6708 1 \u65e5\u304b\u3089\u306e\u6642\u9593\u3092\u793a\u3059 64 \u30d3\u30c3\u30c8\u5024\u3092 100 \u30ca\u30ce\u79d2\u5358\u4f4d\u3067\u793a\u3057\u307e\u3059 (DBTYPE_FILETIME)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adGUID<\/td>\n<td align = \"center\" width=\"50\">72<\/td>\n<td width=\"400\">\u56fa\u6709\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u8b58\u5225\u5b50 (GUID) \u3092\u793a\u3057\u307e\u3059 (DBTYPE_GUID)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adIDispatch<\/td>\n<td align = \"center\" width=\"50\">9<\/td>\n<td width=\"400\">COM \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e IDispatch \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3078\u306e\u30dd\u30a4\u30f3\u30bf\u3092\u793a\u3057\u307e\u3059 (DBTYPE_IDISPATCH)\u3002<br \/>\n\uff08\u6ce8\u610f\uff09\u3053\u306e\u30c7\u30fc\u30bf\u578b\u306f\u3001\u73fe\u5728\u306f ADO \u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u4f7f\u7528\u3059\u308b\u3068\u4e88\u671f\u3057\u306a\u3044\u7d50\u679c\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adInteger<\/td>\n<td align = \"center\" width=\"50\">3<\/td>\n<td width=\"400\">4 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u4ed8\u304d\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I4)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adIUnknown<\/td>\n<td align = \"center\" width=\"50\">13<\/td>\n<td width=\"400\">COM \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e IUnknown \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3078\u306e\u30dd\u30a4\u30f3\u30bf\u3092\u793a\u3057\u307e\u3059 (DBTYPE_IUNKNOWN)\u3002<br \/>\n\uff08\u6ce8\u610f\uff09\u3053\u306e\u30c7\u30fc\u30bf\u578b\u306f\u3001\u73fe\u5728\u306f ADO \u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u4f7f\u7528\u3059\u308b\u3068\u4e88\u671f\u3057\u306a\u3044\u7d50\u679c\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adLongVarBinary<\/td>\n<td align = \"center\" width=\"50\">205<\/td>\n<td width=\"400\">\u9577\u30d0\u30a4\u30ca\u30ea\u5024\u3092\u793a\u3057\u307e\u3059 (Parameter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u307f)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adLongVarChar<\/td>\n<td align = \"center\" width=\"50\">201<\/td>\n<td width=\"400\">\u9577\u6587\u5b57\u5217\u306e\u5024\u3092\u793a\u3057\u307e\u3059 (Parameter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u307f)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adLongVarWChar<\/td>\n<td align = \"center\" width=\"50\">203<\/td>\n<td width=\"400\">Null \u3067\u7d42\u4e86\u3059\u308b Unicode \u6587\u5b57\u5217\u5024\u3092\u793a\u3057\u307e\u3059 (Parameter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u307f)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adNumeric<\/td>\n<td align = \"center\" width=\"50\">131<\/td>\n<td width=\"400\">\u56fa\u5b9a\u7cbe\u5ea6\u304a\u3088\u3073\u30b9\u30b1\u30fc\u30eb\u306e\u6b63\u78ba\u306a\u6570\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_NUMERIC)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adPropVariant<\/td>\n<td align = \"center\" width=\"50\">138<\/td>\n<td width=\"400\">\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3 PROPVARIANT \u3092\u793a\u3057\u307e\u3059 (DBTYPE_PROP_VARIANT)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adSingle<\/td>\n<td align = \"center\" width=\"50\">4<\/td>\n<td width=\"400\">\u5358\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u5024\u3092\u793a\u3057\u307e\u3059 (DBTYPE_R4)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adSmallInt<\/td>\n<td align = \"center\" width=\"50\">2<\/td>\n<td width=\"400\">2 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u4ed8\u304d\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I2)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adTinyInt<\/td>\n<td align = \"center\" width=\"50\">16<\/td>\n<td width=\"400\">1 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u4ed8\u304d\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I1)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adUnsignedBigInt<\/td>\n<td align = \"center\" width=\"50\">21<\/td>\n<td width=\"400\">8 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I8)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adUnsignedInt<\/td>\n<td align = \"center\" width=\"50\">19<\/td>\n<td width=\"400\">4 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I4)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adUnsignedSmallInt<\/td>\n<td align = \"center\" width=\"50\">18<\/td>\n<td width=\"400\">2 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I2)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adUnsignedTinyInt<\/td>\n<td align = \"center\" width=\"50\">17<\/td>\n<td width=\"400\">1 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u6574\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_I1)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adUserDefined<\/td>\n<td align = \"center\" width=\"50\">132<\/td>\n<td width=\"400\">\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u306e\u5909\u6570\u3092\u793a\u3057\u307e\u3059 (DBTYPE_UDT)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adVarBinary<\/td>\n<td align = \"center\" width=\"50\">204<\/td>\n<td width=\"400\">\u30d0\u30a4\u30ca\u30ea\u5024\u3092\u793a\u3057\u307e\u3059 (Parameter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u307f)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adVarChar<\/td>\n<td align = \"center\" width=\"50\">200<\/td>\n<td width=\"400\">\u6587\u5b57\u5217\u5024\u3092\u793a\u3057\u307e\u3059 (Parameter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u307f)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adVariant<\/td>\n<td align = \"center\" width=\"50\">12<\/td>\n<td width=\"400\">\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3 \u30d0\u30ea\u30a2\u30f3\u30c8\u578b (Variant) \u3092\u793a\u3057\u307e\u3059 (DBTYPE_VARIANT)\u3002<br \/>\n\uff08\u6ce8\u610f\uff09\u3053\u306e\u30c7\u30fc\u30bf\u578b\u306f\u3001\u73fe\u5728\u306f ADO \u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u4f7f\u7528\u3059\u308b\u3068\u4e88\u671f\u3057\u306a\u3044\u7d50\u679c\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adVarNumeric<\/td>\n<td align = \"center\" width=\"50\">139<\/td>\n<td width=\"400\">\u6570\u5024\u3092\u793a\u3057\u307e\u3059 (Parameter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u307f)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adVarWChar<\/td>\n<td align = \"center\" width=\"50\">202<\/td>\n<td width=\"400\">Null \u3067\u7d42\u4e86\u3059\u308b Unicode \u6587\u5b57\u5217\u3092\u793a\u3057\u307e\u3059 (Parameter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u307f)\u3002<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">adWChar<\/td>\n<td align = \"center\" width=\"50\">130<\/td>\n<td width=\"400\">Null \u3067\u7d42\u4e86\u3059\u308b Unicode \u6587\u5b57\u5217\u3092\u793a\u3057\u307e\u3059 (DBTYPE_WSTR)\u3002<\/td>\n<\/tr>\n<\/table>\n<p>\n    <\/p>\n<\/p><\/div>\n<br \/>\n<h3>\u5217\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\uff09\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u3092\u53d6\u5f97\u3059\u308b\uff08DefinedSize \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>DefinedSize<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>DefinedSize \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306e\u623b\u308a\u5024\u3000\u2026\u3000<strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u306e\u30c7\u30fc\u30bf\u5bb9\u91cf\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<h3>\u30ec\u30b3\u30fc\u30c9\u306e\u30b5\u30a4\u30ba\u3092\u53d6\u5f97\u3059\u308b\uff08ActualSize \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/h3>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>ActualSize<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>ActualSize \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306e\u623b\u308a\u5024\u3000\u2026\u3000\u5bfe\u8c61\u3068\u306a\u308b\u5217\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\uff09\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\uff08\u30ec\u30b3\u30fc\u30c9\uff09\u306e\u5b9f\u969b\u306e\u9577\u3055\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<\/div>\n<br \/><br \/>\n<h2>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8 \u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_ADO_FieldObject()\r\n    \r\n    '\u53c2\u7167\u8a2d\u5b9a\r\n    'Microsoft ActiveX Data Objects 6.1 Library\r\n    \r\n    Dim cn As New ADODB.Connection\r\n    Dim rs As New ADODB.Recordset\r\n    Dim constr As String\r\n    Dim DBFile As String\r\n    Dim strSQL As String\r\n    Dim FieldArray\r\n    Dim i As Long\r\n    Dim j As Long\r\n    Dim myType As Collection\r\n    \r\n    Set myType = New Collection\r\n    myType.Add \"\u7b26\u53f7\u4ed8\u6574\u6570\", \"3\"\r\n    myType.Add \"\u65e5\u4ed8\u578b\", \"7\"\r\n    myType.Add \"\u30c6\u30ad\u30b9\u30c8\u578b\", \"202\"\r\n    \r\n    DBFile = ActiveWorkbook.Path & \"\\mydb1.accdb\"\r\n    constr = \"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\" & DBFile\r\n    \r\n    cn.ConnectionString = constr\r\n    cn.Open\r\n    \r\n    strSQL = \"Select * from \u793e\u54e1\u540d\u7c3f order by ID;\"\r\n    rs.Source = strSQL\r\n    rs.ActiveConnection = cn\r\n    rs.Open\r\n    \r\n    With Worksheets(\"Sheet1\")\r\n        \r\n        .Cells.Clear\r\n        i = 1\r\n        Do Until rs.EOF\r\n            For j = 0 To rs.Fields.Count - 1\r\n                If i = 1 Then .Cells(i, j + 1) = myType.Item(CStr(rs(j).Type))\r\n                If i = 2 Then .Cells(i, j + 1) = rs(j).Name\r\n                .Cells(i + 2, j + 1) = rs(j).Value\r\n            Next j\r\n            rs.MoveNext\r\n            i = i + 1\r\n        Loop\r\n        .Columns(\"A:F\").AutoFit\r\n        \r\n    End With\r\n    \r\n    rs.Close\r\n    Set rs = Nothing\r\n    \r\n    cn.Close\r\n    Set cn = Nothing\r\n    \r\n    Set myType = Nothing\r\n    \r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2017\/07\/adofieldobject_01.jpg?ssl=1\" rel=\"lightbox[6086]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2017\/07\/adofieldobject_01.jpg?resize=580%2C400&#038;ssl=1\" alt=\"ado Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\" width=\"580\" height=\"400\" class=\"alignnone size-large wp-image-6092\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2017\/07\/adofieldobject_01.jpg?resize=580%2C400&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2017\/07\/adofieldobject_01.jpg?resize=400%2C276&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2017\/07\/adofieldobject_01.jpg?w=615&amp;ssl=1 615w\" sizes=\"(max-width: 580px) 100vw, 580px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>Field \u30aa\u30d6\u30b8\u30a7\u30af\u30c8 Recordset \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5185\u306e\u5217\uff08\u30d5\u30a3\u30fc\u30eb\u30c9\uff09\u3092 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":6092,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[948],"tags":[973,953,980,950,721,978,979,968,974,975,351,977,976,970,952,951,883,302,814,955,949,835],"jetpack_featured_media_url":"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2017\/07\/adofieldobject_01.jpg?fit=615%2C424&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-1Aa","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/6086"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=6086"}],"version-history":[{"count":11,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/6086\/revisions"}],"predecessor-version":[{"id":6257,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/6086\/revisions\/6257"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/6092"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=6086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=6086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=6086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}