help!!!
i really dont know how to access my data in my database.. using javascipt..
do you hava any suggeston? i really need it.. i need your help please.. this project is in a hirry.. im developing a ticker which gets its info frm the database and i dont know how to do it.. please help

Dani AI

Generated

— client-side JavaScript running in the browser cannot open an Access (.mdb/.accdb) file directly. A small server-side component is required to talk to the database, run queries, and return results that the browser can fetch (JSON is the usual format). ’s question about what web language to use is on point: pick any server technology that can use ODBC/OLEDB (classic ASP, ASP.NET, PHP with ODBC, Node.js, etc.), and let that server expose a simple HTTP endpoint the ticker can call.

A minimal, modern workflow:

  • Server connects to the Access file (using the proper ODBC/ACE/Jet driver), runs SQL, and returns JSON.
  • Browser JavaScript uses fetch/XHR to GET that JSON and updates the ticker DOM.

Example (server using Node + ODBC) — very small proof of concept:

const express = require('express');
const odbc = require('odbc');

const app = express();
const connStr = 'Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\\path\\to\\db.mdb;';

app.get('/ticker', async (req, res) => {
  const connection = await odbc.connect(connStr);
  const result = await connection.query('SELECT text FROM ticker ORDER BY id DESC');
  await connection.close();
  res.json(result);
});

app.listen(3000);

Client example:

fetch('/ticker')
  .then(r => r.json())
  .then(rows => { /* update ticker from rows array */ });

Important cautions and tips:

  • Access drivers (Jet vs ACE) and bitness (32-bit vs 64-bit) often cause problems — match the driver to the server process.
  • Never expose the .mdb/.accdb file to the web root; keep it accessible only to the server process and protect it with correct filesystem permissions.
  • Sanitize inputs or use parameterized queries to avoid injection.
  • For production or multi-user web apps, consider migrating to MySQL/PostgreSQL/SQL Server — Access is fragile under concurrent web load.

Further reading: Fetch API docs (for the client) — https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API and Express quick start (server) — https://expressjs.com/.

Recommended Answers

All 2 Replies

What web programming language are you using?

im using Javascripting.. because thats the only language i feel comfortable using and im having dificulty to other languages.. is it possible for me to use javascript then connect it to my msaccess database?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.