Home > database >  PB database connection
PB database connection

Time:09-22

SQLCA. DBMS="SYC the Adaptive Server Enterprise", "
The SQLCA. Database="zbbatest"
The SQLCA. ServerName="zbbatest"
The SQLCA. LogId="sa"
The SQLCA. Logpass=""
The SQLCA. The AutoCommit=False
The SQLCA. DBParm=""
Connect using the sqlca;
If the sqlca. Sqlcode<> 0 then
Messagebox (" Information ", "database connection zbbatatest error: ~ r ~ n ~ r ~ n error details: ~ r ~ n" + sqlca. Sqlerrtext, stopsign!)
Return
End the if
Open (w_mdi_out)
This is part of others to send me the source code, is some of the parameters set database
I want to know, how I want to run the program, I need to connect to the database
When I run the program errors ct_connect (); The directory service layer; Interual directory control layer error. The requested server name not found

CodePudding user response:

Do you want to connect the database is a sybase ase, if it is can connect with this, but need to ensure that the client can be connected

CodePudding user response:

SQLCA. DBMS="SYC the Adaptive Server Enterprise", "
//set up the connection wayThe SQLCA. Database="zbbatest"//Database name
SQLCA. ServerName="zbbatest"//database server, network addresses, the server name
The SQLCA. LogId="sa"//database account
The SQLCA. Logpass=""//database password
SQLCA. The AutoCommit=False//whether AutoCommit
The SQLCA. DBParm=""
Connect using the sqlca;//connection
This section is to connect to the database code
The error message, you want to make sure that the database name, server location, connection if there is any wrong,
  • Related