注册 登录
编程论坛 SQL Server论坛

JSP数据库建表

qq1274371820 发布于 2016-12-08 17:05, 2193 次点击
用的HBuilder,数据库创建成功,但不能创建表,求大神看看是哪里出问题了



<script type="text/javascript">
                var dataBase = openDatabase("student", "1.0", "学生表", 1024 * 1024, function () { });
                if (!dataBase)
                {
                    alert("数据库创建失败!");
                } else {
                    alert("数据库创建成功!");
                }


                this.createTable=function()
                {
                    dataBase.transaction(function(tx)
                    {
                        tx.executeSql
                        (
                            "create table if not exists stu (id REAL UNIQUE, name TEXT)",
                            [],
                            function(tx,result)
                            {
                                alert("创建stu表成功");
                            },
                            function(tx, error)
                            {
                                alert("创建stu表失败:" + error.message);
                            });
                    });
                    
                }
            </script>
2 回复
#2
梦幻倩影2016-12-10 09:56
http://bbs.
#3
qq12743718202016-12-11 13:19
回复 2楼 梦幻倩影
好像不是同一个问题-.-
他用的JAVA我用的H5..........................
1