| Products | Minisoft News | Events | Downloads | Product Manuals
 
  News

Minisoft News

Demo and Updates


Download an Evaluation today!

Updates

Release Notes (Jun 4, 2002)

Documentation


MiddleMan Manual

FAQ

   Product Review


Features

MSJOB

Using INETD_NT

MiddleMan
Application Samples

Know Problem Reports

Type Libraries

MDMDA

MDMFT

MDMFTP

MDMSA

 
   

Minimal Image Data - Access from VB5

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 As Object
Dim da As Object

On Error Resume Next

  Set da = CreateObject("MdmDA.Session")
  da.TraceLevel = 0
  da.HostAddress = "yourhost"
  da.Port = "30002"
  da.LoginUser = "yourname"
  da.LoginGroup = "yourgrp"
  da.LoginAccount = "youracct"
  If Not da.Connect Then
    MsgBox ("Connect failed: " + _
    da.ErrorMessage)
    End
  End If

  If da.LoginStatus = False Then
    MsgBox ("Login failed: " + _
    da.ErrorMessage)
    End
  End If

  Set db = da.AddImageDBRef("MSCARD")
  If Not db.DBOpen("MSCARD", _
      "DBPASS", 5) Then
    MsgBox ("DBOpen failed: " + _
    da.ErrorMessage)
    End
  End If

  Set ds = db.AddDatasetRef("CUSTOMER")
  ds.Delimiter = ""
  If Not ds.DBFind(1, "ACCOUNT", _
  Command) Then
    MsgBox ("DBFind failed: " + _
    ds.ErrorMessage)
    End
  End If

  If Not ds.DBGet(5, _
    "ACCOUNT,LASTNAME,FIRSTNAME;", _
    "X") Then
    MsgBox ("DBGet failed: " + _
    ds.ErrorMessage)
    End
  End If

  x = InputBox("", "", _
    Trim(ds.Item("LASTNAME")))

  End

End Sub

Sample

[sample8.zip]