Int li_i, li_flag
SQLCA. DBMS=profileString (" pB. INI ", "Database", "DBMS", "")
The SQLCA. Database=profileString (" PB. INI ", "Database", "Database", "")
The SQLCA. LogID=profileString (" PB. INI ", "Database", "LogID", "")
The SQLCA. LogPass=profileString (" PB. INI ", "Database", "LogPassword", "")
The SQLCA. ServerName=profileString (" PB. INI ", "Database", "ServerName", "")
The SQLCA. UserID=profileString (" PB. INI ", "Database", "UserID", "")
The SQLCA. DBPass=ProfileString (" PB. INI ", "Database", "DatabasePassword", "")
The SQLCA. LOCK=ProfileString (" PB. INI ", "Database", "LOCK", "")
The SQLCA. DbParm=ProfileString (" PB. INI ", "Database", "DbParm", "")
The connect.//use the parameters of just connect to the database server
If the SQLCA. Sqlcode & lt;> 0 then//database connection is not correct
Beep (2)
Messagebox (" prompt ", "and the database connection error!" , Information!
The halt close;//or entering the database server connection parameters setting interface
Elseif SQLCA. Sqlcode=0 then
Open (w_main)//Open the main operating window
Li_i=3
Li_flag=1
DO While li_flag=1//password is not correct number and try not reached three times has been executing the following statement
Open (w_password)//Open the user authentication and password window
If Message. Stringparm="ok" then//check right
Li_flag=0
The Else//inspection is not correct
Li_i=li_i - 1
If li_i=0 then li_flag=0
End the If
Loop
If li_i=0 then
Beep (3)
Messagebox (" prompt ", "login error!" , Information!
The Halt Close;
End the If
End If
CodePudding user response:
Database connection error for the SQLCA. Sqlcode & lt;> 0Also is to use the connect statement has not been normal execution, the cause of the problem is that the errors in the parameters below, please check the Pb. Various parameters in ini
Settings are correct
SQLCA. DBMS=profileString (" pB. INI ", "Database", "DBMS", "")
The SQLCA. Database=profileString (" PB. INI ", "Database", "Database", "")
The SQLCA. LogID=profileString (" PB. INI ", "Database", "LogID", "")
The SQLCA. LogPass=profileString (" PB. INI ", "Database", "LogPassword", "")
The SQLCA. ServerName=profileString (" PB. INI ", "Database", "ServerName", "")
The SQLCA. UserID=profileString (" PB. INI ", "Database", "UserID", "")
The SQLCA. DBPass=ProfileString (" PB. INI ", "Database", "DatabasePassword", "")
The SQLCA. LOCK=ProfileString (" PB. INI ", "Database", "LOCK", "")
The SQLCA. DbParm=ProfileString (" PB. INI ", "Database", "DbParm", "")
CodePudding user response:
The connect.//use the parameters of just connect to the database serverLeft
Connect using the sqlca;
CodePudding user response:
In "and the database connection error!" The prompt addMessagebox (' ', the sqlca. Sqlerrtext) have a look at what it prompt error first,,,
CodePudding user response:
I can't stick figure, the error is:Can't and the database connection is established right!
Error code: 999
Error message: the DBMS is not supported in your current installation.
Please give advice or comments!!!!!!!!!!
CodePudding user response:
The pB. INI file open the DBMS=the line may be posted database interface drivers don'tCodePudding user response:
I in PB INI is not found in the DBMS=the line,