0

I am developing an web page (html5) for my graduation project. In the web page the user would provide "body type" and based on the input various garments's images would be pulled from database and displayed on the page.

I am not a technical student so failing in my database connection efforts.

I have index.html page, a .mdb db (ms access 2007) and using js to connect to the .mdb. I also installed the "Microsoft Access Database Engine 2010 Redistributable". Then too failing.

Kindly mention what I am missing.

sunita
  • 1
  • 1

2 Answers2

0

I think you have got it all wrong! The short answer is you can not. And that is because your design is wrong. You can not* directly connect form html5 / javascript to a database.

Back to the basics. You will need server side scripting to read the database content and expose them to the client (javascript) or to embed directly the result to html5 (while server is building the page). You need to take a look to the following technologies

  • java / Jsp
  • c# / aspx

Those will help you to read the db file on the server side. Then as I said you will need to find a way to expose that information to your web page. As a side note, those are not the only server side scripting technologies, but are the one (IMHO) the can read an access file. So look into that direction you will find a lot of resources to help you.

*The truth is that you can, but this can be considered an 'advance' issue.

Athafoud
  • 2,898
  • 3
  • 40
  • 58
0

HTML pages are mostly accessed via a Server (IIS, Apache,..) and the data work is done by the server, on the server (AKA ServerSide programming) So first consider if your project is intended to be accessed this way or only locally / standalone to your very computer.

If you only want a local page, there might be a solution here : http://accessdb.sourceforge.net/ But I bet it only works on IE through ActiveX

Read this : Read and write to an access database using Javascript

Also : why MSaccess ? If you really try to manipulate data locally using JS, try SQLite, there should be many library for JS like this one : https://github.com/lovasoa/sql.js

or why not... the HTML5 webstorage objects, that could be pushed far http://www.w3schools.com/html/html5_webstorage.asp

Community
  • 1
  • 1
gis
  • 56
  • 5