A Deno.js Javascript Client Implementing The ADODB Protocol on Windows

A Deno.js Javascript Client Implementing The ADODB Protocol on Windows

deno-adodb A deno.js javascript client implementing the ADODB protocol on windows.

deno-adodb

A deno.js javascript client implementing the ADODB protocol on windows.

Warnings

  1. This project is in the early stages of its development. So many things can still change.
  2. To use deno-adodb you must manually save the contents of the repository on your PC. I don't know if it will be possible to avoid this in the future.
  3. The library need system support Microsoft.Jet.OLEDB.4.0 or Microsoft.ACE.OLEDB.12.0, Windows XP SP2 above support Microsoft.Jet.OLEDB.4.0 by default, Others need to install support! Recommended use Microsoft.ACE.OLEDB.12.0, download: Microsoft.ACE.OLEDB.12.0

How to use

Create a demo.ts file containing this code:

import { execute, cscriptSync, command } from "./mod.ts";

const nameDatabase = Deno.args[0];
const cscriptString: string = cscriptSync();

const cmd = command.schema.getAllTables(cscriptString, nameDatabase);
const result = await execute(cmd);

console.log("CAPTURED:" , result.captured);
console.log("CMD:", result.cmd);
console.log("STATUS ADODB:" , result.statusAdodb);
console.log(JSON.parse(result.result));

From the terminal use this code:

deno run --unstable --allow-run --allow-read --allow-env demo.ts "./demo/adodb.mdb"

parse.result will contain an object similar to this:

{
  schema: [
    { TABLE_NAME: "MSysAccessObjects", TABLE_TYPE: "ACCESS TABLE" },
    { TABLE_NAME: "MSysACEs", TABLE_TYPE: "SYSTEM TABLE" },
    { TABLE_NAME: "MSysNavPaneGroupCategories", TABLE_TYPE: "ACCESS TABLE" },
    { TABLE_NAME: "MSysNavPaneGroups", TABLE_TYPE: "ACCESS TABLE" },
    { TABLE_NAME: "MSysNavPaneGroupToObjects", TABLE_TYPE: "ACCESS TABLE" },
    { TABLE_NAME: "MSysNavPaneObjectIDs", TABLE_TYPE: "ACCESS TABLE" },
    { TABLE_NAME: "MSysObjects", TABLE_TYPE: "SYSTEM TABLE" },
    { TABLE_NAME: "MSysQueries", TABLE_TYPE: "SYSTEM TABLE" },
    { TABLE_NAME: "MSysRelationships", TABLE_TYPE: "SYSTEM TABLE" },
    { TABLE_NAME: "Users", TABLE_TYPE: "TABLE" }
  ]
}

MODULES:

  • cscript and cscriptSync: identifies the location of "cscript.exe" on the PC where deno-adodb is launched.
  • execute: performs operations on the database and return the result in the form of JSON (or CVS).
  • command: a set of predefined commands to pass as an argument to execute

COMMAND.SCHEMA

Query database schema information (see SchemaEnum).

  • schema.getAllTables(cscriptString, nameDatabase);: Returns the tables (including views) defined in the catalog that are accessible to a given user.

COMMAND.QUERY

Query tables:

  • query.getAllValue(cscriptString, nameDatabase, nomeTable);: Returns all of the fields and records for the table (or view).
  • query.sql(cscriptString, nameDatabase, sqlString);: Execute a SQL statement.

TO DO

  • schema.getAllTables(cscriptString, nameDatabase);: Returns the tables (including views) defined in the catalog that are accessible to a given user.
  • schema.getTablesByType(cscriptString, nameDatabase, tableType);: Returns the tables (including views) defined in the catalog that are accessible to a given user.
  • query.sql(cscriptString, nameDatabase, sqlString);: Execute a SQL statement.

Download Details:

Author: el3um4s

Source Code: https://github.com/el3um4s/deno-adodb

deno nodejs javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top 5 Reasons Javascript Developers Prefer Deno over Nodejs

The maker of NodeJS, Ryan Dahl, has released a new runtime that aims to solve many of the shortcomings of Node. Your initial reaction might be “Oh great, another Javascript framework? Just what I needed…”. Don’t worry, I had the same reaction. After understanding the advantages, I too saw why Deno is exactly what a back-end Javascript developer needs in 2020. Let’s take a look at the top 5 reasons javascript developers are having a much smoother and more modern experience using Deno vs. Node.

Deno - How to Compile & Run Javascript Code in Deno Runtime

Learn How to Compile & Run Javascript Code in Deno Runtime.

What is Deno? Deno vs. NodeJS

What is Deno? Deno vs Node. Deno is the upgraded version of NodeJS. Explore features of Deno. Will it take over Node.js or not? Deno is based on Google's Chromium V8 JavaScript engine and written in programming language Rust as opposed to C++ for Node

Deno ¿el verdadero Nodejs?

Deno ¿el verdadero Nodejs? - El 13 de mayo de 2020 se liberó la versión 1.0 de Deno, un nuevo entorno de ejecución para correr javascript y typescript, basado en el motor V8 de Google y ...

Decoding Nodejs

The main goal of this blog is to explain the “Architecture of Nodejs” and to know how the Nodejs works behind the scenes. Generally, most of the server-side languages, like PHP, ASP.NET, Ruby, and including Nodejs follows multi-threaded architecture. That means for each client-side request initiates a new thread or even a new process.