Click here to Skip to main content
15,867,999 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I was inserting tables into database , I got this error of objectSqlError


C#
db1=openDatabase(id, version, displayName,maxSize);
db1.transaction(function(transaction)
 {
 tx.executeSql('CREATE TABLE IF NOT EXISTS customer(UserId INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, Cust_name TEXT NOT NULL, Address1  TEXT NOT NULL,Address2  TEXT NOT NULL ,Address3 TEXT NOT NULL , Tel INTEGER NOT NULL , Email TEXT NOT NULL, Fax INTEGER NOT NULL , Credit_period INTEGER NOT NULL)',transaction_error);

function transaction_error(tx, error)
{
  alert("Database Error: " + error);
}


The fields have the same name as given in the code even the database is created.But not the table, I recieve this error

Can anybody solve this please??
Posted
Updated 12-May-14 2:11am
v4
Comments
Paulo Augusto Kunzel 12-May-14 8:39am    
Have you tried to run the Create statement on the database?
p@y@l 12-May-14 23:54pm    
Yes it creates.I tried.
p@y@l 13-May-14 6:22am    
Thanks for the interest of help.That was some callback issues and I solved it. :)
Richard MacCutchan 13-May-14 6:01am    
Please provide the exact error message you receive and indicate on what line of code it occurs.
p@y@l 13-May-14 6:21am    
Thanks for the interest of help.That was some callback issues and I solved it. :)

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