Click here to Skip to main content
15,877,859 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am a visual basic programmer, I designed software for learning English in Sudan and I wanted to transfer this software to work on mobile devices so I started learning javascript. I managed to work out most of the software. the last thing I need is code to open a database table and retrieve fields into variables with the functionality of moving next/previous through the table. . I read about some terms like indexeddb and others but I could figure out how to make them work. please provide clear steps. thanks in advance

What I have tried:

<!DOCTYPE html>  
<meta http-equiv = "Content-Type" content = "text/html; charset = utf-8" />  
<title> JavaScript IndexedDb Demo </title>  
<h2> JavaScript IndexedDb Demo </h2>  
<p id = "demos"> </p>  

function readRecords() {
    var mydb;
    const request_variable ='book', 1);
mydb =request_variable.result;

var trans = mydb.transaction(["beginner"]);
var objectStore = trans.objectStore("beginner");
var request1 = objectStore.get("1");
alert("database was opened")

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900