读书人

数据库表有NULL值时登陆出现Runtime E

发布时间: 2012-02-28 13:06:34 作者: rapoo

数据库表有NULL值时登陆出现Runtime Error! - C++ Builder / Windows SDK/API
Employee_addrEmployee_postcode Employee_notes Login_name Login_password
丰台 100071 无 kele Kekedou521
NULLNULL NULL hello kekedou


系统用户数据库如上图,第二行(也就是keke所在行)中有NULL值,当用第一行(也就是kele)登录时,成功登陆,可用第二行(也就是hello)登陆时,失败,


提示Runtime error! ...this application has requested the Runtime to terminate it in an unusual way.please contact the application 's support team fro more information

[解决办法]
没判断非NULL就读取了
[解决办法]

Login_name=NULL;
Login_password=NULL;
出现Runtime Error是与你在程序中对Login_name、Login_password进行比较处理时没进行非空判断有关系的

读书人网 >C++ Builder

热点推荐