当前位置:网站首页>写在eclipse里面,与数据库连接查询之后的问题
写在eclipse里面,与数据库连接查询之后的问题
2022-06-27 16:00:00 【CSDN问答】
大佬们,帮帮孩子吧,好人有好报,好人长命百岁!!!!刚刚开始学java和数据库,写了一点关于这方面的东西,结果我的这个eclipse连接数据库之后,刚开始进行查询,老是报错,说是查询失败,还有显示java.lang.NullPointerException, 代码报错在下面代码中的( if (rs.next()) ),这个怎么办啊?下面是部分代码:
if (account.length()!=0&&password.length()!=0) {
try { //密码账号都有效
//userDao判断密码是否正确
rs = userDao.selectByAccountAndPassword(account, password) //账号密码正确,返回结果集不为null
if (rs.next()) {
user = userDao.saveUser(rs);
if (user.getRole() == BaseDao.userRoLeStudent) {
System.out.println("是学生");
边栏推荐
- 软件测试-测试的概念,单元测试的详细介绍,如何设计测试用例
- Software testing learning - dark horse programmer, software testing learning outline
- 2/15 topology sorting +dfs (the order of specified directions is very important) +bfs
- 全面解析零知识证明:消解扩容难题 重新定义「隐私安全」
- leetcode 69. Square root of X
- 简历如何去写?
- Repeatedly recognized by authoritative organizations! Smartbi was selected into the top three lists of high-tech and high growth enterprises
- Autodesk Navisworks 2022软件安装包下载及安装教程
- [leetcode] 2. Add two numbers (user-defined listnode), medium
- Kubernetes基础自学系列 | Ingress API讲解
猜你喜欢
![[leetcode] 2. Add two numbers (user-defined listnode), medium](/img/27/1e7ce0e08d7428f0f594a3477e35df.jpg)
[leetcode] 2. Add two numbers (user-defined listnode), medium

d3dx9_ 39.dll how to repair -d3dx9_ 39.dll missing file download

Annual comprehensive analysis of China's audio market in 2022

软件测试基础-软件测试历史流程,分类,好处,限制

d3dx9_ How to repair 38.dll? d3dx9_ 38. How to download a missing DLL?

Electronic smart package tutorial

Unity shadow shadow pancaking

Simulated process scheduling
![[JS reverse hundreds of examples] I love to solve 2022 Spring Festival problems and receive red envelopes](/img/cb/0be2b2cf3b2cfa903190b7795d3cd7.jpg)
[JS reverse hundreds of examples] I love to solve 2022 Spring Festival problems and receive red envelopes

JS event binding and common events
随机推荐
Simulated process scheduling
How much room does Migu video have for development without relying on sports events?
Hospital reservation and registration system - system structure
建立自己的网站(10)
SQLite net (SQLite is used by unity, WPF and WinForm)
2022 Liaoning latest fire facility operator simulation test question bank and answers
[multithreading] thread communication scheduling, waiting set wait(), notify()
2022 Liaoning's latest eight members (Safety Officer) simulated test question bank and answers
Leetcode daily practice (sum of two numbers)
C语言教师工作量管理系统
Byte + Google super full kotlin learning King fried notes! Kotlin introductory tutorial + Advanced kotlin enhanced actual combat (with demo)
Use pyinstaller to package py files into exe. Precautions and error typeerror:_ get_ sysconfigdata_ name() missing 1...‘ check_ Solutions to exists'
10分钟掌握mysql的安装步骤
Explain the distributed computing of Apache skywalking OAP in detail
Halcon: discrete digital OCR recognition
Popularization of MCU IO port: detailed explanation of push-pull output and open drain output
d3dx9_ Where is 35.dll? d3dx9_ Where can I download 35.dll
Related configuration commands of Huawei LACP
ROS "topic" programming implementation
Advanced learning of MySQL -- Application -- view, stored procedure, trigger