{"id":500,"date":"2011-11-10T15:38:19","date_gmt":"2011-11-10T20:38:19","guid":{"rendered":"http:\/\/blog.xfloyd.net\/?p=500"},"modified":"2011-11-15T01:21:11","modified_gmt":"2011-11-15T06:21:11","slug":"power-saving-usb-enclosure","status":"publish","type":"post","link":"https:\/\/xfloyd.net\/blog\/?p=500","title":{"rendered":"PHP ODBC MAS90\/200"},"content":{"rendered":"<p>Create System DSN MAS90PHP best if you copy SOTAMAS90 DSN add username and password to it. And make sure you run apache under user that has access to mas90 share even in mas200. Below is code that you can test connection with.<\/p>\n<pre>&lt;?php\r\n$conn = odbc_connect('MAS90PHP','','');\r\nif (!$conn)\r\n{exit(\"Connection Failed: \" . $conn);}\r\nelse\r\necho\"Connected&lt;BR&gt;\";\r\n\r\n$query = \"SELECT * FROM GL_Audit\";\r\n$result = odbc_exec($conn, $query) or die(odbc_errormsg());\r\n\r\nwhile(odbc_fetch_row($result)){\r\necho odbc_result($result, \"FieldName\") . \"&lt;br&gt;\";\r\n\r\n}\r\n\r\nodbc_close($conn);\r\necho\"Connection Closed\";\r\n?&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Create System DSN MAS90PHP best if you copy SOTAMAS90 DSN add username and password to it. And make sure you run apache under user that has access to mas90 share even in mas200. Below is code that you can test connection with. &lt;?php $conn = odbc_connect(&#8216;MAS90PHP&#8217;,&#8221;,&#8221;); if (!$conn) {exit(&#8220;Connection Failed: &#8221; . $conn);} else echo&#8221;Connected&lt;BR&gt;&#8221;; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/500"}],"collection":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=500"}],"version-history":[{"count":6,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/500\/revisions"}],"predecessor-version":[{"id":509,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/500\/revisions\/509"}],"wp:attachment":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}