0

So I am in the middle of developing an android application using android studio for delivery drivers.

How can I retrieve data stored in my database and display it as a barcode? , preferably a QR code. The purpose of this is so the barcode can be scanned.

Ryan
  • 11

1 Answers1

3

Accessing a database directly from JavaScript is generally considered very risky, as it will give your clients direct access. It is considered much safer to use a server side language such as PHP, Java, .Net, etc... However, assuming you are aware of the risks, and it isn't a concern, this post goes into good detail on how to set up a database connection to a SQL server through JavaScript

How to connect to SQL Server database from JavaScript in the browser?

In terms of then generating a QRCode, this post offers a few good APIs for generating QR codes in Javascript.

javascript API for generating QR codes

Hope this helps!