marquisd Posted October 6, 2014 Share Posted October 6, 2014 Hello I'm trying to build a (very) simple simulation that accesses a data variable from MS Access (2007). I have a table called "CurrentValues", with a couple columns named Station1Pressure and Station1Temperature. For my sim, in the first instance, I just want to read in (DBRead step) in the values; so, I have process that reads the value when I click a button. Eventually, I want to update the database value with a form in Access and see the change when I click the event button in Simio. Note: The database (Sample.accdb) and the sim are in the same directory. First problem is, after I define the Element reference (DbConnect), I set the "Connection String" to the database file, (Sample.accdb) and the "Provider Name" to "Microsoft.ACE.OLEDB.12.0" as noted in another post. Unfortunately, I get the error attached. (I'll start with that since if I can't get through the first step, the following ones are irrelevant.) Thanks Link to comment Share on other sites More sharing options...
gtwirth Posted October 10, 2014 Share Posted October 10, 2014 NOTE: Inserting Data into MS Access is very slow...I suggest using MySQL or Microsoft Sql Server Your 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...
marquisd Posted October 13, 2014 Author Share Posted October 13, 2014 Follow-up: Now, attached is a screenshot of my database table. I want to get the value of Station1Pressure with a DBRead step and put it into "ModelStation1Pressure" state. I guess what I really need is a better definition of what "Columns" and "Where" properties in the Basic Logic of the step really means and how they are different from the "Where Column" and "Where State". It seems to be that they actually do nearly the same things. Clearly this doesn't make sense. Thanks Link to comment Share on other sites More sharing options...
marquisd Posted October 14, 2014 Author Share Posted October 14, 2014 Nevermind! Found it. Answers: No, you don't need to (probably shouldn't) fill in both items in the Dbread step. Cheers Link to comment Share on other sites More sharing options...
marquisd Posted October 14, 2014 Author Share Posted October 14, 2014 Actually, one more question...what Simio statement can I use to get the value in the last row of a database table without doing a query inside Access? This would correspond to the latest data. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts