ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 12-27-2012
Rao Yuqing Rao Yuqing is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 3
Downloads: 13
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Rao Yuqing is on a distinguished road
Default What's the difference between SQL mode and table mode when I use the command dbopen()?

I want to make connection to the access database.But in the command dbopen(), I don't understand the difference between SQL mode and table mode.
What's the difference between SQL mode and table mode when I use the command dbopen()?
If someone can tell me ,I will appreciate very much.
Thanks.
  #2  
Old 12-29-2012
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

In table mode the whole table is opened and the cells can be edited. In SQL mode a SELECT query may only return a subset of a table and the cells cannot be edited.

SQL mode can be more versatile as you can: select just the records you want; perform joins between two or more tables; perform table operations on the database (including CREATE and ALTER), and perform transformations on the data fields as part of the query process.
The Following 2 Users Say Thank You to Jason Lightfoot For This Useful Post:
Rao Yuqing (12-29-2012)
  #3  
Old 12-29-2012
Rao Yuqing Rao Yuqing is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 3
Downloads: 13
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Rao Yuqing is on a distinguished road
Default

Thank you Jason.
Now I am developing a model which I want to write to a database and also read from the database. At the same time, my colleague uses C# to visit the access database too. But when I debug the model, the error appears.
The error is:Microsoft Office Access database engine has stopped the process, because you and other users are trying to change the unified data at the same time. Driver: [Microsoft][ODBC Microsoft Access Driver] FlexSim Code: 23 - SQLSetPos
What can I do for avoiding the error?
  #4  
Old 01-07-2013
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Try organizing your data so that Flexsim reads from some table and writes to others. That way you shouldn't run into problems with the other application trying to write to 'Flexsim's' tables. If you need to view a mix of this read and write data then create views in Access or via SQL for that.

If you absolutely need to have concurrent writes to the same tables I think you'll need something with one or a mixture of: table locking, transaction processing/rollback/commit, calling stored procedures and/or mutual exclusivity (mutex). Also check the DB driver allows concurrent sessions. A.J. might have some more ideas.

Last edited by Jason Lightfoot; 01-07-2013 at 07:42 AM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Jörg Vogel (01-07-2013)

Tags
dbopen()


Thread Thread Starter Forum Replies Last Post
[Suggestion]Time bar can be used in Full Screen Mode KelvinHo Gripes and Goodies 1 05-20-2010 03:25 AM
Compiling a DLL in release mode Steven Hamoen Q&A 1 04-29-2010 09:02 AM
GUI: cant enter GUI edit mode KelvinHo Q&A 4 04-01-2008 10:44 AM
How to use the actual date/time data in Arrival Schedule Mode of Source syseo Q&A 0 10-12-2007 08:22 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.