Home > Software engineering >  On the registration screen hint user name to register
On the registration screen hint user name to register

Time:09-23

I made a about MFC registration screen in the same input user name when you click on the confirmation after prompt the user name already exist?
Now the idea is to define a variable frame the user editorial content extracted, and then to look for in the database and found the same prompt, without the same validation by
But how can achieve
Cstrings x;
X=IDC_EDIT_Name;
Cstrings sqlStr_findid;
If (sqlStr_findid="SELECT * FROM member WHERE MemberName='" + x +"' ")
{
MessageBox (" the user name has been registered!" );
return;
}
This is my first code, but no matter whether the user name after the insert in repeated will give tip has been registered

CodePudding user response:

If (sqlStr_findid="SELECT * FROM member WHERE MemberName='" + x +"' ") is an assignment statement, is not associated with a database query

CodePudding user response:

reference 1st floor zgl7903 response:
if (sqlStr_findid="SELECT * FROM member WHERE MemberName='" + x +"' ") is an assignment statement, is not associated with a database query
can elaborate on that

CodePudding user response:

You will be registered to the database, why you don't use the query?

CodePudding user response:

SqlStr_findid="SELECT * FROM member WHERE MemberName='" + x +"' "
You are on to sqlStr_findid assignment, the root database query didn't have anything to do

CodePudding user response:

Check online first MFC how to retrieve data from a database, you didn't write the database connection

CodePudding user response:

refer to the second floor qq_26986261 response:
Quote: refer to 1st floor zgl7903 response:

If (sqlStr_findid="SELECT * FROM member WHERE MemberName='" + x +"' ") is an assignment statement, is not associated with a database query
can you go into more detail about

This more detailed?
int a;
If (a==1) sometimes is true or false,
If (a=1) when it can be performed successfully, forever is true

CodePudding user response:

https://yqc.im/vc-ado-sql.html
  • Related