GET ODBC SUBSCRIPT connect string

Use this forum to post Vensim related questions.
Post Reply
MKui
Junior Member
Posts: 16
Joined: Thu Mar 01, 2018 3:57 pm
Vensim version: DSS

GET ODBC SUBSCRIPT connect string

Post by MKui »

The CONNECT string in GET ODBC SUBSCRIPT() is hard coded in the model. When we package the model to a vpmx and distribute the model where the database is on a other location that doesn't work. We like the path to the database in the connect string to be flexibel, so it can be speficied outside the model.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: GET ODBC SUBSCRIPT connect string

Post by Administrator »

One of the limitations of GET ODBC SUBSCRIPT is that it cannot be used in the model reader. So if you do want to distribute the model and use this function, the other users will need Vensim DSS as well.

You can use a string variable to store the connect string. This can then be set using a CIN file.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
MKui
Junior Member
Posts: 16
Joined: Thu Mar 01, 2018 3:57 pm
Vensim version: DSS

Re: GET ODBC SUBSCRIPT connect string

Post by MKui »

Will this also work when we publish the model in DSS to a vpmx and make it only readable by DSS?
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: GET ODBC SUBSCRIPT connect string

Post by Administrator »

It should. But if you are distributing the model, you will need to hard code the subscript ranges into it.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply