Home > database > Using pb read the value of the database
Using pb read the value of the database
Time:09-19
My database in the data type of varchar But take less than data in the database,,, This program is to read the data in the database value: String username String keyword String s_KW, s_NM String user The string key User=Trim (sle_1. Text) Key=Trim (sle_2. Text) Declare student cursor for the select KW from PASS where NM=: s_NM; S_NM=trim (sle_1. Text) The open student; The fetch student into: s_KW; The username=string (s_NM) Keyword=string (s_KW) If the user=username and key=keyword then Messagebox (" true ", "login successfully!" ) Close (the parent) The else Messagebox (" false ", "login failed, please input again!" ) Sle_1. Text=string (sle_1. Text) Sle_2. Text=' End the if The close student;
CodePudding user response:
Connect to the database?
Step once, see a problem somewhere, if you do not take data, have a look at the sqlca. Sqlerrtext return is anything wrong, according to the error to modify the program