This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at 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.

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

Q&A Using Flexsim and building models

Old 12-12-2012
Vadim Fooks's Avatar
Vadim Fooks Vadim Fooks is offline
Flexsim User
Join Date: Feb 2012
Posts: 67
Downloads: 26
Uploads: 0
Thanks: 50
Thanked 24 Times in 13 Posts
Rep Power: 118
Vadim Fooks will become famous soon enough
Default 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!
The Following 2 Users Say Thank You to Vadim Fooks For This Useful Post:
Jörg Vogel (12-13-2012)
Old 12-13-2012
AJ Bobo's Avatar
AJ Bobo AJ Bobo is offline
Flexsim Senior Developer
Join Date: Jul 2007
Posts: 108
Downloads: 8
Uploads: 0
Thanks: 23
Thanked 89 Times in 41 Posts
Rep Power: 221
AJ Bobo is a jewel in the roughAJ Bobo is a jewel in the roughAJ Bobo is a jewel in the roughAJ Bobo is a jewel in the rough


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.

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

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.