Home > database >  Questions about unable to connect to the database
Questions about unable to connect to the database

Time:10-06

Runtime always shows that connect to the database failed, don't know what's the problem, the trouble to help see,

The SQLCA. DBMS="ODBC"
The SQLCA. The AutoCommit=False
The SQLCA. DBParm="ConnectString='DSN=RSGLXT'"
CONNECT USING the SQLCA;//connected transaction object
If the sqlca. Sqlcode & lt;> 0 then
Messagebox (' error: ', 'to connect to the database failed! ')
Return
End the if


GetEnvironment (Ge_Env)
Gi_ScreenH=Ge_Env. ScreenHeight
Gi_ScreenW=Ge_Env. ScreenWidth
Gi_ScreenWPBU=PixelsToUnits (Gi_ScreenW XPixelsToUnits!)
Gi_ScreenHPBU=PixelsToUnits (Gi_ScreenH YPixelsToUnits!)

Open (w_hehe)

CodePudding user response:

On the PB in league? His statement direct connect if I could, come out!

And a messagebox (' error: ', 'to connect to the database failed! '+ sqlca sqlerrtext) look at the error message!

CodePudding user response:

//Profile EAS Demo DB V3
The SQLCA. DBMS="ODBC"
The SQLCA. Database="EAS Demo DB V3"
The SQLCA. The AutoCommit=False
The SQLCA. DBParm="ConnectString='DSN=EAS Demo DB V3; UID=dba; The PWD=SQL '"

Your lack of UID=dba; The PWD=SQL
If all is empty, so write
The SQLCA. DBParm="ConnectString='DSN=EAS Demo DB V3; UID=; The PWD='"

CodePudding user response:

Don't use the UID=dba; The PWD=SQLP this is also possible,

CodePudding user response:

Connection does not provide a user name password?
  • Related