{"id":14,"date":"2016-05-13T09:10:50","date_gmt":"2016-05-13T01:10:50","guid":{"rendered":"http:\/\/www.inhhh.com\/?p=14"},"modified":"2016-05-13T09:11:37","modified_gmt":"2016-05-13T01:11:37","slug":"%e6%94%b9%e5%86%99%e4%bb%a3%e7%a0%81%e4%b8%ba%e7%ad%96%e7%95%a5%e4%b8%ba%e7%8e%8btsking-%e6%ba%90%e4%bb%a3%e7%a0%81-%e5%a2%9e%e5%8a%a0-sql%e5%ad%98%e5%82%a8%e4%ba%8c","status":"publish","type":"post","link":"http:\/\/www.inhhh.com\/blog\/?p=14","title":{"rendered":"\u6539\u5199\u4ee3\u7801\u4e3a\u7b56\u7565\u4e3a\u738bTSKING (\u6e90\u4ee3\u7801) \u589e\u52a0 SQL\u5b58\u50a8\u4e8c <\u5199\u4ee3\u7801>"},"content":{"rendered":"<p>\u9996\u5148\u9879\u76ee\u8981\u52a0\u5165SQL \u652f\u6301<\/p>\n<p>\u6253\u5f00StkLib \u4e2d StdAfx.h\uff0c\u52a0\u5165<\/p>\n<p>#ifndef _AFX_NO_STKLIBAFXADO_SUPPORT<br \/>\n#import &#8220;c:\\program files\\common files\\system\\ado\\msado15.dll&#8221; \\<br \/>\nno_namespace \\<br \/>\nrename (&#8220;EOF&#8221;, &#8220;adoEOF&#8221;)<br \/>\n#define _AFX_NO_STKLIBAFXADO_SUPPORT<br \/>\n#endif<\/p>\n<p>\u5728\u9879\u76eeStkLib\u4e2d\u6dfb\u52a0\u7c7b\u00a0CStkLibWnd, \u5373\u6dfb\u52a0\u4e86\u00a0StkLibWnd.h \u4e0e\u00a0StkLibWnd.cpp \u4e24\u4e2a\u6587\u4ef6<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ \u00a0 \u00a0StkLibWnd.h \u00a0\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<p>#if !defined(AFX_StkLibWnd_H____INCLUDED_)<br \/>\n#define AFX_StkLibWnd_H____INCLUDED_<br \/>\n#if _MSC_VER &gt; 1000<br \/>\n#pragma once<br \/>\n#endif<br \/>\n#include &#8220;StdAfx.h&#8221;<\/p>\n<p>class CStkLibWnd;<br \/>\nSTKLIB_API CStkLibWnd&amp; AfxGetCStkLibWnd(); \/\/\u53c2\u8003\u5de5\u7a0b\u4e2d\u5176\u5b83\u9879\u76ee\u7684\u5b9e\u4f8b\u5316\uff0c\u4ee5\u540e\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528<\/p>\n<p>struct COMM_PACKET;<\/p>\n<p>class STKLIB_API CStkLibWnd \/\/: public CWnd<br \/>\n{<\/p>\n<p>public:<br \/>\nCStkLibWnd();<br \/>\nvirtual ~CStkLibWnd(); \/\/\u6790\u6784<br \/>\nbool test(); \u00a0\/\/\u7528\u6765\u6d4b\u8bd5<\/p>\n<p>};<\/p>\n<p>#endif<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ \u00a0 \u00a0StkLibWnd.cpp \u00a0\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<p>#include &#8220;StkLibWnd.h&#8221;<br \/>\n\/\/<br \/>\n#ifdef _DEBUG<br \/>\n#define new DEBUG_NEW<br \/>\n#undef THIS_FILE<br \/>\nstatic char THIS_FILE[] = __FILE__;<br \/>\n#endif<\/p>\n<p>CStkLibWnd &amp;AfxGetCStkLibWnd()<br \/>\n{<br \/>\nstatic CStkLibWnd g_stStkLibwnd;<br \/>\nreturn g_stStkLibwnd;<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>bool CStkLibWnd::test()<br \/>\n{<br \/>\nreturn true;<br \/>\n}<\/p>\n<p>CStkLibWnd::CStkLibWnd()<br \/>\n{<\/p>\n<p>}<\/p>\n<p>CStkLibWnd::~CStkLibWnd()<br \/>\n{<br \/>\n}<\/p>\n<p>\/\/\/\/\/\/<\/p>\n<p>\u4e3a\u4e86\u6d4b\u8bd5\uff0c\u4fee\u6539Database.cpp\u6587\u4ef6\uff0c\u6d4b\u8bd5\uff0c\u80fd\u5426\u6b63\u5e38\u8fd0\u884c<\/p>\n<p>\u9996\u5148 SelfDB.h \u52a0\u5165\u76f8\u5173\u5934\u6587\u4ef6 \u00a0#include &#8220;StkLibWnd.h&#8221;<\/p>\n<p>\u4fee\u6539 int CStDatabase::LoadCodetable( CStockContainer &amp; container ) \u51fd\u6570<\/p>\n<p>\u52a0\u5165\u4e00\u884c<\/p>\n<p>bool bFlag = AfxGetCStkLibWnd().test();<\/p>\n<p>\u5982\u679c\u7f16\u8f91\u4e0e\u8fd0\u884c\u6b63\u5e38\u901a\u8fc7\uff0c\u8868\u793a\uff0c\u7f16\u5199\u65b9\u6cd5\u6b63\u786e\uff0c\u4ee5\u540e\u8c03\u6574 \u8bfb\u53d6\u6587\u4ef6\u7684\u65b9\u6cd5\uff0c\u53ea\u9700\u8981\u8c03\u7528 AfxGetCStkLibWnd().\u540c\u6784\u51fd\u6570\uff0c\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u6709\u4eba\u95ee\u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u6539\u5199\u5176\u4e2d\u4e00\u4e2a\u94b1\u9f99\u7684\u683c\u5f0f\u6216FXJ\u7684\u683c\u5f0f\u53d8\u6210sql\u6570\u636e\u5e93\uff0c\u8fd9\u91cc\u662f\u4e2a\u4eba\u7ecf\u9a8c\uff0c\u56e0\u4e3a\u662f\u6d3e\u751f\u7c7b\u4fee\u6539\u9ebb\u70e6<\/p>\n<p>class CSelfDB : public CQianlong \u00a0= \u300b \u00a0class CQianlong : public IStStore<br \/>\n\u4f60\u8981\u4e48\u5c31\u8981\u6539\u5199\u5168\u90e8\uff0c\u8981\u4e48\u5c31\u7f16\u8bd1\u4e0d\u901a\u8fc7\uff0c\u5f53\u7136\uff0c\u6211\u4e5f\u4e0d\u662f\u9ad8\u624b\uff0c\u5982\u679c\u6709\u4eba\u6709\u66f4\u65b9\u4fbf\u7684\u65b9\u6cd5\uff0c\u8bf7\u544a\u8bc9\u6211\uff0cQQ\u6216\u8005\u53d1\u90ae\u4ef6\u90fd\u53ef\u4ee5, \u4e0d\u80dc\u611f\u6fc0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u9879\u76ee\u8981\u52a0\u5165SQL \u652f\u6301 \u6253\u5f00StkLib \u4e2d StdAfx.h\uff0c\u52a0\u5165 #ifndef _AFX_NO_ST<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"http:\/\/www.inhhh.com\/blog\/?p=14\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-aside","hentry","category-it","post_format-post-format-aside"],"_links":{"self":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":2,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":18,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/18"}],"wp:attachment":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}