{"id":1879,"date":"2014-11-13T19:09:55","date_gmt":"2014-11-13T19:09:55","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=1879"},"modified":"2020-06-11T13:54:29","modified_gmt":"2020-06-11T20:54:29","slug":"minimal-image-data-access-from-vb5","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/minimal-image-data-access-from-vb5\/","title":{"rendered":"Minimal Image Data &#8211; Access from VB5"},"content":{"rendered":"<h3>The MDMDA session<\/h3>\n<p>The MDMDA session object is being called from a Visual Basic 5.0 application. This sample will return the data requested in an InputBox so that it is available for cut and paste. It takes the search item value as the only command line parameter.<\/p>\n<pre>Sub Main()\n\nDim ds As Object\nDim db As Object\nDim da As Object\n\nOn Error Resume NextSet&nbsp;da&nbsp;=&nbsp;CreateObject(\"MdmDA.Session\")\nda.TraceLevel = 0\nda.HostAddress = \"yourhost\"\nda.Port = \"30002\"\nda.LoginUser = \"yourname\"\nda.LoginGroup = \"yourgrp\"\nda.LoginAccount = \"youracct\"\nIf Not da.Connect Then\nMsgBox&nbsp;(\"Connect&nbsp;failed:&nbsp;\"&nbsp;+&nbsp;_\nda.ErrorMessage)\nEnd\nEnd IfIf da.LoginStatus = False Then\nMsgBox (\"Login failed: \" + _\nda.ErrorMessage)\nEnd\nEnd If\n\nSet db = da.AddImageDBRef(\"MSCARD\")\nIf Not db.DBOpen(\"MSCARD\", _\n\"DBPASS\", 5) Then\nMsgBox (\"DBOpen failed: \" + _\nda.ErrorMessage)\nEnd\nEnd If\n\nSet ds = db.AddDatasetRef(\"CUSTOMER\")\nds.Delimiter = \"\"\nIf Not ds.DBFind(1, \"ACCOUNT\", _\nCommand) Then\nMsgBox (\"DBFind failed: \" + _\nds.ErrorMessage)\nEnd\nEnd If\n\nIf Not ds.DBGet(5, _\n\"ACCOUNT,LASTNAME,FIRSTNAME;\", _\n\"X\") Then\nMsgBox (\"DBGet failed: \" + _\nds.ErrorMessage)\nEnd\nEnd If\n\nx = InputBox(\"\", \"\", _\nTrim(ds.Item(\"LASTNAME\")))\n\nEnd\n\nEnd Sub<\/pre>\n<h3><strong>Sample<\/strong><\/h3>\n<p>[<a href=\"\/support\/wp-content\/uploads\/2014\/11\/sample8.zip\"><span style=\"text-decoration: underline;\">sample8.zip<\/span><\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The MDMDA session The MDMDA session object is being called from a Visual Basic 5.0 application. This sample will return the data requested in an InputBox so that it is available for cut and paste. It takes the search item value as the only command line parameter. Sub Main() Dim ds As Object Dim db [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,54],"tags":[],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/1879"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=1879"}],"version-history":[{"count":5,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/1879\/revisions"}],"predecessor-version":[{"id":8029,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/1879\/revisions\/8029"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=1879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=1879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=1879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}