Interface from M/SQL



Caché

ISM

M/SQL is a development tool which may be used for Caché and ISM systems. VC/m comes with a set of hooks to integrate with M/SQL. To set this up:

Caché


  1. Log into %SYS and run ^PROTECT. For the directory containing the FDBMS software (normally in c:\cachesys\mgr\fdbms), give all globals Read/Write/Delete access.
  2. Create a namespace called %FDBMS, mapped to database FDBMS.
  3. Log into namespace %FDBMS and run ^%msql.
  4. Edit the form 'BaseTable'.

    Add the following routine trigger to the Post Retrieval Trigger (Pst Ret Trigger) for the form:

    checkout^%vc1msql("MMT",{BaseTabName})

    If there are other triggers here, this should be inserted as the last one. Once this change has been made, re-compile the form.

    Note: Do not change the type of form compilation. If it defaults to OLD, leave it as OLD. If it defaults to NEW, leave it as NEW. If the form compilation type is NEW, you may need to set the Use Local Storage argument to NO in order to avoid a STORE error during compilation.
  5. Edit the form 'Form Definition'

    Add the following routine trigger to the Post Retrieval Trigger (Pst Ret Trigger) for the form:

    checkout^%vc1msql("MMW",{FormName})

    If there are other triggers here, this should be inserted as the last one. Once this change has been made, re-compile the form.
  6. Edit the form 'Menu Object Definition'

    Add the following routine trigger to the Post Retrieval Trigger (Pst Ret Trigger) for the form:

    checkout^%vc1msql("MMB",{MenuName})

    If there are other triggers here, this should be inserted as the last one. Once this change has been made, re-compile the form.
  7. Add the following call to the Per-transfer, termination call-out on screen 1 of the Properties option in VC/m Set-up:

    Import^%vc1msql
  8. Set up the following global node in each namespace where M/SQL will be run:

    namespace>set ^vcvp("psa")=psa

    (Here, psa is the name of the physical location which corresponds to that namespace
  9. Change the active namespace /directory configuration back to the normal namespace /directory. If you do not, it will reset back the next time it is re-started.

ISM


  1. Log into /usr/msql/common and run ^%PROTECT. Give all globals in this area Read/Write/Delete access.
  2. Log into /usr/msql and use ^UTIL to create a namespace configuration for /usr/msql that maps the following globals to /usr/msql/common:
    ^mcompd
    ^mdd
    ^mddc
    ^mform
    ^mformc
    ^mhelp
    ^mmenu
    ^mmisc
    ^mobject
    ^mpriv
    ^mreport
    ^mreportc
  3. Log into /usr/msql and run ^%msql.
  4. Log into namespace %FDBMS and run ^%msql.
  5. Edit the form 'BaseTable'.

    Add the following routine trigger to the Post Retrieval Trigger (Pst Ret Trigger) for the form:

    checkout^%vc1msql("MMT",{BaseTabName})

    If there are other triggers here, this should be inserted as the last one. Once this change has been made, re-compile the form.

    Note: Do not change the type of form compilation. If it defaults to OLD, leave it as OLD. If it defaults to NEW, leave it as NEW. If the form compilation type is NEW, you may need to set the Use Local Storage argument to NO in order to avoid a STORE error during compilation.
  6. Edit the form 'Form Definition'

    Add the following routine trigger to the Post Retrieval Trigger (Pst Ret Trigger) for the form:

    checkout^%vc1msql("MMW",{FormName})

    If there are other triggers here, this should be inserted as the last one. Once this change has been made, re-compile the form.
  7. Edit the form 'Menu Object Definition'

    Add the following routine trigger to the Post Retrieval Trigger (Pst Ret Trigger) for the form:

    checkout^%vc1msql("MMB",{MenuName})

    If there are other triggers here, this should be inserted as the last one. Once this change has been made, re-compile the form.
  8. Change the active namespace /directory configuration back to the normal namespace /directory. If you do not, it will reset back the next time it is re-started.