SQLite Forum

Finding database file
Login
Verified by changing the version number and the database didn't open. I am using WebKit since I am using Chrome and Safari.  I will not run in Firefox.
I have identified most of my problems and fixed them, they were with my code. I can add records and select the records and print them out, but the database in the code path has more data in than what I am adding. I have verified this by using DB Browser.  
I am now trying to insert and print three columns in each row. I think I have the table created correctly but not sure, I am still working on that.  I am also trying to get the error messages to print correctly.
The error code that I am getting with the below code is 5. the Relationship column does not exist. The columns 1 and 2 are added and get populated.
See code below:
db.transaction(
        function a(tx) {
            tx.executeSql('create table IF NOT EXISTS Family (id unique, Name text, Relationship text, Age integer)');
            tx.executeSql('INSERT INTO Family (id,Name,Relationship,Age) VALUES(1,"ABCD","Husband",00)');
            tx.executeSql('INSERT INTO Family (id,Name,Relationship,Age) VALUES(2,"EFGHi","Wife",01)');
            alert('Table created and rows inserted');
        }
    );
    db.transaction(
        function b(tx){
            tx.executeSql('SELECT id,Name,Relationship,Age FROM Family', [],
                function resultCallback(tx,results){
                   var len = results.rows.length;
                   alert('Found rows: ' + len);
                   for (i=0;i<len;i++) {
                        alert(results.rows.item(i));
                    }
                },
                function errorCallBack(tx,results) {
                    alert('Error Encountered: '+results);
                }