How can I use a model with database operations in java ?
How can I use a model with database operations in java ?
hi.
I can run java example comes ; java example of the model will address modification model for database operations can not run my establishment .
But vensim mine is running .
Can anyone tell me how to do ?
I can run java example comes ; java example of the model will address modification model for database operations can not run my establishment .
But vensim mine is running .
Can anyone tell me how to do ?
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: How can I use a model with database operations in java ?
I do not understand your question.
Can you explain again? Can you upload your model?
Can you explain again? Can you upload your model?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: How can I use a model with database operations in java ?
Administrator wrote:I do not understand your question.
Can you explain again? Can you upload your model?
oh,sorry.
My English is poor.
java
-------------------------------------------------
result = vensim.command( "SPECIAL>LOADMODEL|C:\\Documents and Settings\\All Users\\Vensim\\odbc2\\odbctest.vpm" );
result = vensim.command( "SIMULATE>RUNNAME|1" );
result = vensim.command( "MENU>RUN|O" );
when it runs,some error like that
---------------------------
Stop from Vensim
---------------------------
Problems encountered in the simulation.
---------------------------
enter
---------------------------
the model can run in vensim dss.
- Attachments
-
- odbc2.zip
- (1.44 MiB) Downloaded 165 times
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: How can I use a model with database operations in java ?
What values are you getting for "result"? It should be =1 if the command has executed properly.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: How can I use a model with database operations in java ?
result = vensim.command( "MENU>RUN|O" );Administrator wrote:What values are you getting for "result"? It should be =1 if the command has executed properly.
After executing the above code
result = 0
before result value is 0 ,there has two dialog ("确定" it means ok or enter): when i click "确定" button,it will pop the other dialog: My java code logic is right?
Is there any conditions need to be set in advance ?
Re: How can I use a model with database operations in java ?
this is the publish .vpm file dialog.
Re: How can I use a model with database operations in java ?
Are you using a recent version? There were some problems in the ODBC example prior to 6.2 or 6.3, as I recall.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: How can I use a model with database operations in java ?
tomfid wrote:Are you using a recent version? There were some problems in the ODBC example prior to 6.2 or 6.3, as I recall.
oh,the version is 6.1c .
I will try the recent version.
thank you
Re: How can I use a model with database operations in java ?
I using the recent version,the result is 0 too.
Whether that version the .vpm file run in java alway show me the .vdf file is protected,when I choose another one,it can run and delete .vdf file what I choose.
Is it a bug?
or
I operate it in the wrong way.
help!!!
Whether that version the .vpm file run in java alway show me the .vdf file is protected,when I choose another one,it can run and delete .vdf file what I choose.
Is it a bug?
or
I operate it in the wrong way.
help!!!
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: How can I use a model with database operations in java ?
When you publish, do not include any files and untick the "Settings" box.
What value to you get for "result" when you open the model?
What value to you get for "result" when you open the model?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: How can I use a model with database operations in java ?
Also, using "1" for the runname is theoretically OK, but potentially troublesome, because that means your vdf will be named 1.vdf, which might have side effects. Can't say as I don't do it.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/