2 Replies Latest reply: May 15, 2014 10:03 AM by drobert _ RSS

    Change database of external lookup using ODBC connection

    drobert _

      I have a model that I have setup an external lookup with ODBC connection and use a specific table. This works great for the extract for this specific institution that it was setup for, but because each institution has their own database; it obviously does not work for the others.:(

       

      The extracts are intended to be done in a batch fired from a Scheduler, so it already knows which institution it is creating the extract for, so I thought of using the /datasource command line parameter. The problem is that I am not sure what I need to enter at that point (do I enter exactly what is in the Data Source[/B] textbox in the External lookup?).

       

      Here is what I have done:

      I have defined my external lookup in my model and named it test[/B] and defined the Data Source[/B] string to be

      ODBC;DSN=RFS SQL;UID=drobert;APP=Monarch for Windows;WSID=NB-0505-02;DATABASE=RFS189;Trusted_Connection=Yes[/code]

       

      What needs to change is the DATABASE=RFS[B][I]xxx[/I][/B] part of the string. Everything else is identical, even the field names within each identically named tables of each database.

       

      To invoke monarch I did the following:

      monarch I167B999.101 "RFS 101 Extract.xmod" /t "/datasource:test=ODBC;DSN=RFS SQL;UID=drobert;APP=Monarch for Windows;WSID=NB-0505-02;DATABASE=RFS167;Trusted_Connection=Yes"[/code]

       

      If I look at the data, the field that is used in the lookup simply returns NULL because it does not match the data.

       

      I saw in another [URL="http://www.monarchforums.com/showthread.php?t=1486&highlight=%2FDATABASE_NAME"]thread[/URL] that the option /DATABASE_NAME was used, but I cannot find any documentation on this option.

       

       

      Am I going about this the right way? Any other suggestions?