Connect
Connect specifies the information required to log on to an SQL server or an ODBC data source.
Syntax
[form.]Report.Connect[=
DataSourceName;UserID;Password;DatabaseQualifier$]
For example:
CrystalReport1.Connect = "DSN = Accounting;UID = 734;PWD = bigboard;DSQ
= Administration"
«Connects to the "Administration" database on the "Accounting" server using the user ID #734 and the password "bigboard".»
CrystalReport1.Connect = "dsn=; uid=; pwd=bigboard; dsq="
«Connects to a password-protected Paradox database. All that is being passed is the password "bigboard".»
Remarks
- Use the Connect property when the report connects to only a single ODBC data source or SQL server, and only a single set of log on information is required. If the report connects to multiple data sources that require different log on information, use LogOnInfo.
- Enter the parameters necessary to log on to the SQL server that you need to be activated for your report. Parameters should be in the following format:
DSN = name;UID = userID;PWD = password;DSQ = database qualifier
- name is the server name or ODBC data source name,
- userID is the name you have been assigned for logging on to the SQL server,
- password is the password you have been assigned for logging on to the SQL server, and
- database qualifier is the database name if your server uses the database concept.
- The database qualifier parameter, DSQ, is required only when it is applicable to the ODBC/SQL driver you are using. If your DBMS does not use the database concept, you do not need to specify the DSQ parameter.
- Before you can use this property for an ODBC/SQL database, you must install the ODBC/SQL driver for whatever SQL database you are planning to use, and put the Database/BIN location in your path.
- If you are connecting to an SQL or other password protected database directly, without going through ODBC, use the name of the SQL server for the DSN parameter.
Data Type
String
Availability
Design Time; Runtime
Related Report Engine Functions
PESetNthTableLogOnInfo