ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
|
Downloads |
Pre-sales Questions Want to know more about Flexsim? Ask our existing users! |
#2
|
||||
|
||||
There a lot of ways to get data into Flexsim:
1 Copy paste into the tables of flexsim from Excel 2 Import from Excel with OLE or DDE 3 Import from a flat text file 4 Import from a database with ODBC Use imagination and C++ to create any other way possible. Steven Last edited by Cliff King; 01-17-2009 at 07:35 PM. |
#4
|
|||
|
|||
Like Steven and Cliff state, there are a number of ways and I think it might be your skill set that determines which will be easiest for you. One way (the one I use) is to set up user or system Data Source Name (DSN) to your database. Then use the commands prefixed with 'db' to read and write data:
dbchangetable dbclose dbexportnode dbexporttable dbgetfieldname dbgetmetrics dbgetmode dbgetnumcols dbgetnumrows dbgettablecell dbgettablenum dbgettablestr dbimportnode dbimporttable dbopen dbsettablecell dbsettablenum dbsettablestr dbsqlquery dbusername dbviewtable dbwritechanges These are described very well in the Commands help. There are two modes of use - table mode and query mode, as determined by the way you open the connection using dbopen(). I'm an SQL guy so that's the mode I find easiest. |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Congshi Wang (07-26-2010) |
#5
|
||||
|
||||
There is a little example model I uploaeded some time ago as an example to prevent questions regarding the database connection ...
Here is a link to the model Sample_Database_TD. Please see the description for further information. Note: Be sure there is an alias (Sample_Database_TD) created for the database. This is done using the "Data Sources" option in the Windows Control Panel. In German Windows XP this is done under: Systemsteuerung | BDE Administrator or Systemsteuerung | Verwaltung | Datenquellen (ODBC). In German Windows Vista this is done under: Systemsteuerung | Verwaltung | Datenquellen (ODBC) or if using Vista 64bit in the Explorer under \Windows\SysWOW64\odbcad32.exe. I hope this model helps. I am not a database expert, so I use the table mode, which works for me.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
The Following User Says Thank You to Tom David For This Useful Post: | ||
Congshi Wang (07-26-2010) |