{"id":381,"date":"2007-08-15T15:33:27","date_gmt":"2007-08-15T07:33:27","guid":{"rendered":"http:\/\/www.jason695.idv.tw:81\/wordpress\/?p=381"},"modified":"2008-05-15T17:01:23","modified_gmt":"2008-05-15T09:01:23","slug":"%e5%8b%95%e6%85%8b%e7%94%a2%e7%94%9ftableadapter%e7%9a%84sql-select-%e6%9f%a5%e8%a9%a2","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2007\/08\/15\/%e5%8b%95%e6%85%8b%e7%94%a2%e7%94%9ftableadapter%e7%9a%84sql-select-%e6%9f%a5%e8%a9%a2\/","title":{"rendered":"\u52d5\u614b\u7522\u751ftableadapter\u7684SQL SELECT \u67e5\u8a62"},"content":{"rendered":"<p><strong>\u5728OBS02DataSet_12.vb\u4e2d\u81ea\u884c\u64b0\u5beb\uff1a<\/strong><\/p>\n<pre lang=\"VBNET\" line=\"1\">\r\nNamespace OBS02DataSet1TableAdapters\r\nPartial Public Class OBS12TableAdapter\r\n\r\nPublic ReadOnly Property DbCommandCollection() As IDbCommand()\r\nGet\r\nReturn Me.CommandCollection\r\nEnd Get\r\nEnd Property\r\n\r\nPublic Function FillWhere(ByVal dataTable As DataTable, ByVal whereExpression As String) As Integer\r\nDim text1 As String = Me.CommandCollection(0).CommandText\r\nTry\r\nMe.CommandCollection(0).CommandText += \" WHERE \" + whereExpression\r\nReturn Me.Fill(DataTable)\r\nFinally\r\nMe.CommandCollection(0).CommandText = text1\r\nEnd Try\r\nEnd Function\r\nEnd Class\r\nEnd Namespace\r\n<\/pre>\n<p><strong>\u7528\u6cd5\uff1a<\/strong><\/p>\n<pre lang=\"VBNET\" line=\"1\">\r\nDim whereExpression As String = \"lastname='batman'\" '\u7d44WHERE\u5b57\u4e32\r\nMe.OBS12TableAdapter.FillWhere(Me.OBS02DataSet_12.OBS12, whereExpression)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728OBS02DataSet_12.vb\u4e2d\u81ea\u884c\u64b0\u5beb\uff1a Namespace OBS02DataSet1TableA &hellip; <a href=\"https:\/\/jason695.why3s.tw\/wordpress\/2007\/08\/15\/%e5%8b%95%e6%85%8b%e7%94%a2%e7%94%9ftableadapter%e7%9a%84sql-select-%e6%9f%a5%e8%a9%a2\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">\u52d5\u614b\u7522\u751ftableadapter\u7684SQL SELECT \u67e5\u8a62<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-381","post","type-post","status-publish","format-standard","hentry","category-net","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=381"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/381\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}