本文介绍了Javascript - 什么是objectSqlError?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在将表插入数据库,我得到了objectSqlError的错误
I was inserting tables into database , I got this error of objectSqlError
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??
推荐答案
这篇关于Javascript - 什么是objectSqlError?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!