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 |
#1
|
||||
|
||||
Database backend best practice
What is the recommended way of integrating the database backend with FlexSim?
I tried using the db*() functions, but they only seem to work when the query is successful. Any exception results in a system dialog, which is not what I want most of the time. I have not found any way of intercepting database exceptions. Does it mean that the backend has to be designed never to throw any exceptions? If I want to have my own exception handling (on the level of dealing with "duplicate key"/"key does not exist" type exceptions) I have to use the C++ API? Thank you! Vadim |
The Following 2 Users Say Thank You to Vadim Fooks For This Useful Post: | ||
Jörg Vogel (12-13-2012) |
#2
|
||||
|
||||
Vadim,
There is no way in Flexsim of intercepting database exceptions. Flexsim's db* commands are designed with the assumption that queries will be well-formed and meaningful. That set of commands is also designed to rely on the error messages of the client database because that way the Flexsim developers (namely, me) didn't have to worry about all the ways that something could go wrong. A meaningful error from the database is more helpful to the user than simply some sort of generic Flexsim error message. If you want more control over your database interactions, then a custom-written Flexsim-compatible DLL is probably the best option. A.J. |
The Following 3 Users Say Thank You to AJ Bobo For This Useful Post: | ||
Vadim Fooks (12-13-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
Connecting to a database | naren nataraj | Q&A | 3 | 09-11-2012 06:21 AM |
Reading Tables from a Database !! | Nischith Kashyap | Q&A | 6 | 03-03-2011 01:05 AM |
Database Stored Procedures | AJ Bobo | Tips and Tricks | 0 | 11-04-2010 03:09 PM |
advise on using database operation | David Chan | Q&A | 2 | 09-27-2010 03:38 AM |
Sample Access Database | Brandon Peterson | Tips and Tricks | 1 | 07-09-2008 12:15 PM |