建立与数据库的连接 [英] Estabhlishing a Connection to my Database

查看:72
本文介绍了建立与数据库的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

展开 | 选择 | Wrap | 行号

推荐答案

这是因为您正在检查状态是否未打开。在检查之前它永远不会打开,所以它永远不会运行其他。
It''s because you''re checking if the state is not open. It''s never going to be open before the check so it will never run the else.


我在消息出现之前打开了连接。
i opened the connection before message will appear.


是的,在消息出现之前打开它。问题是你检查它是否打开后打开它。因此,在您检查之前它永远不会打开。
Yes, you open it before the message appears. The problem is you open it after you check if it''s open. Therefore, it is never open before you check.


这篇关于建立与数据库的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆