I was wondering, can arduino read data from the MS Access? Like for example, a person types his ID number then presses ENTER. Can arduino find the information stored in the database? After transaction and changes have been made, can the Arduino make changes to the information in the database?
I have been taught the basics of the Arduino but is tasked to do this. I really need some help because of the deadlines. thanks in advance for who will help.
You need a PC program that can send data to an Arduino using a serial (COM) port. I don't know whether MS Access can be directly programmed to do that or whether you need a separate PC program that can read data from the Access database and send it to the Arduino.
For receiving data on the Arduino have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.
Robin2 is correct - MS Access does not have the means to serial communications; reading the database is performed by software.
Assuming you've never used MS Visual Studio, to get you started, you can download MS Visual Basic and MS Visual Studio C#(very simple to learn and with many examples available on youtube, stackoverflow.com, codeproeject.com, etc) from here. Also to help you along, the following link illustrates a working example to read the MS access database from your custom created software; you'll need to change the following to match your MS access program - "Provider=Microsoft.Jet.OLEDB.4.0"; example - 4.0 is for MS Acces 2007 and earlier, 12.0 is for Access 2010 & 13. And then finally, the following link provides an example of opening and reading the serial port.
Thank you very much for the enlightenment and for the links. I will have to read it. I now assume that MS Access may not be suitable for me. I know this is kinda little out of topic but do you guys know what could be the most appropriate database program to use? Cos I need the Arduino to read data from the database and print the data from the database into the thermal receipt. I kinda have knowledge on how the arduino and thermal printer interact but have no idea if the "data-from-database-to-arduino-to-printer" will work.
Thanks again for the generous replies Robin2 and JMeller! More power and more ideas to come!
Connects over an IP network (WiFi, ethernet) and allows you to use SQL statements inside your sketch to read the database.
The MySQL server itself is always connected over a network socket (localhost for a local server, or ip or hostname for remote server), so probably easiest if you use some networking service to connect to your server. A NodeMCU would be very suitable with its built-in WiFi. Just connect to a local WiFi network and you can connect to your MySQL server, very easy.
Why do you need an Arduino ? Can you not just generate a form in access into which you enter the name/code or whatever , then access finds the corresponding data a presents you with a report ?
Oh, okay! I will try to research on mysQL library thanks for that.
Maybe I wrote that wrong. Maybe I shouldve wrote, "deliver data from the database to the Arduino"? Hmm..
I need the Arduino to control my devices (thermal receipt, SD Card Module, Bill Acceptor).
I just need them to work together with the database their source of data and then prints out the data from the database to the thermal printer. The thermal receipt then has the data from the database and data from the bill acceptor printed out altogether.
Do you guys might have a different concept or maybe different approach? Anything would be appreciated.
An RPi (as suggested in your other thread as well) will be able to host that database itself, and quite certainly be able to operate those components in the meantime. Sounds more and more like the appropriate platform for this job.
Updating your database is something to also keep in mind.