database:sql.js the note demo

question query:


1.to create notes from html page

(1)input from textarea label,

(2) save button,finish the function of write it into data base(INNSERT)


2.save it to database

(1)a button with js function


3.read it

(1 select them from database(files),how? SELECT FROM? how to do in detail

(2

4.edit it (change it)

(1 a button with js function to change the note data in database file(notedata.js) 




the techs which need to get now:

a.how to write data from html and transport it into notedata.js?

b.how to read data from notedata.js into html page?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是可能导致"Error querying database. Cause: java.sql.SQLException: interrupt?"错误的原因和解决方法: 1. 数据库连接中断或超时。可以尝试重新连接数据库或增加连接超时时间。 2. SQL语法错误。可以检查SQL语句是否正确,是否缺少关键字或拼写错误。 3. 数据库对象不存在。可以检查SQL语句中引用的表、列、视图等是否存在,或者是否被删除。 4. 数据库权限不足。可以检查当前用户是否有执行该SQL语句的权限。 5. 数据库资源不足。可以检查数据库是否存在死锁或者其他资源争用问题。 ```java // 以下是Java代码示例,用于连接数据库并执行SQL语句 import java.sql.*; public class Example { public static void main(String[] args) { String url = "jdbc:mysql://localhost:3306/mydatabase"; String user = "root"; String password = "mypassword"; Connection conn = null; Statement stmt = null; ResultSet rs = null; try { conn = DriverManager.getConnection(url, user, password); stmt = conn.createStatement(); String sql = "SELECT * FROM mytable"; rs = stmt.executeQuery(sql); while (rs.next()) { // 处理查询结果 } } catch (SQLException e) { System.out.println("Error querying database. Cause: " + e.getMessage()); } finally { try { if (rs != null) rs.close(); if (stmt != null) stmt.close(); if (conn != null) conn.close(); } catch (SQLException e) { System.out.println("Error closing database connection. Cause: " + e.getMessage()); } } } } --相关问题--:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值