gtwirth Posted December 19, 2012 Share Posted December 19, 2012 NOTE....Code has been removed from this post. Please use the DB Read and DB Write steps that are provided when Simio is installed. There is a DBReadWrite simbit. The code is provided in C:\Users\Public\Documents\Simio\Examples\UserExtensions\DbReadWrite Link to comment Share on other sites More sharing options...
gtwirth Posted October 18, 2013 Author Share Posted October 18, 2013 If you want to connect use MS Access, here is the information that you need. (NOTE: Writing to MS Access is not recommended....It is very slow. We suggest using MySQL instead. Instruction on how to setup MySQL are provided in the DBReadWrite simbit.) The connect string should be: Provider=Microsoft.ACE.OLEDB.12.0;data source=C:\\Users\\dbName.mdb The provider should be: OleDb Data Provider If you are getting an error stating"Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine", see the following URLs... Running connectivity to MS Access using 64 bit apps is a well known issue. If this is an issue on your side, either follow the steps in the following URL or run SImio in 32 bit mode. http://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine http://www.microsoft.com/en-us/download/details.aspx?id=13255 Link to comment Share on other sites More sharing options...
Achrafchen Posted November 2, 2013 Share Posted November 2, 2013 Hello Glen Wirth, thank you, I run the model but it displays this message: Link to comment Share on other sites More sharing options...
sparakh Posted October 6, 2014 Share Posted October 6, 2014 I ran into a problem with writing data to a MySQL database table from Simio. The issue was MySQL was complaining about the String representation of a node (Node.Name) that I was trying to write to a VARCHAR() type database column using the DBExecute Step (using native sql in the SQL Statement). The error was something on the lines of "Unknown Column in field list". Found the answer on a mySQL posting. The solution is to surround the String value with a single quote (') character when writing it out to using a DBExecute statement. MySQL thinks it reading a column name instead of an actual value (wierd!). For instance, if I wanted to write the String "ABC" to a VARCHAR column, I should instead write "'ABC'" (adding a single quote on either sides of the String). If I wanted to write the Node name to the VARCHAR column, I should write "'" + Node.Name + "'" I thought this might be helpful and save others valuable time debugging. 1 Link to comment Share on other sites More sharing options...
Recommended Posts