|
Description
|
Returns/sets a value that provides information about the source of an open connection or an open database.
|
Syntax Visual Basic
|
[form.]IXF.Connect[ = Text$]
|
|
Visual C++
|
CString IXF.GetConnect(); void IXF.SetConnect(LPCTSTR lpszNewValue);
|
|
Delphi
|
property Connect: WideString;
|
|
C#
|
string IXF.Connect;
|
|
Remarks
|
The Connect property syntax has two parts:
| Part | Description | | databasetype | Optional. A String that specifies a database type. For Microsoft Jet databases, exclude this argument; if you specify parameters, use a semicolon (;) as a placeholder. | | parameters | Optional. A String that specifies additional parameters to pass to ODBC or installable ISAM drivers. Use semicolons to separate parameters. |
The Connect property setting is a String composed of a database type specifier and zero or more parameters separated by semicolons. The Connect property passes additional information to ODBC and certain ISAM drivers as needed. To perform an SQL pass-through query on a table linked to your Microsoft Jet database (.mdb) file, you must first set the Connect property of the linked table's database to a valid ODBC connection string. For base tables in a Micorosoft Jet database (.mdb), the Connect property setting is a zero-length string (""). The following table shows possible database types and their corresponding database specifiers and paths for the Connect property setting. In an ODBCDirect workspace, only the "ODBC" specifier can be used: | Database type | Specifier | Example | | Microsoft Jet Database | [database]; | drive:\path\filename.mdb | | dBASE III | dBASE III; | drive:\path | | dBASE IV | dBASE IV; | drive:\path | | dBASE 5 | dBASE 5.0; | drive:\path | | Paradox 3.x | Paradox 3.x; | drive:\path | | Paradox 4.x | Paradox 4.x; | drive:\path | | Paradox 5.x | Paradox 5.x; | drive:\path | | Microsoft Excel 3.0 | Excel 3.0; | drive:\path\filename.xls | | Microsoft Excel 4.0 | Excel 4.0; | drive:\path\filename.xls | | Microsoft Excel 5.0 or Microsoft Excel 95 | Excel 5.0; | drive:\path\filename.xls | | Microsoft Excel 97 | Excel 8.0; | drive:\path\filename.xls | | Lotus 1-2-3 WKS and WK1 | Lotus WK1; | drive:\path\filename.wk1 | | Lotus 1-2-3 WK3 | Lotus WK3; | drive:\path\filename.wk3 | | Lotus 1-2-3 WK4 | Lotus WK4; | drive:\path\filename.wk4 | | HTML Import | HTML Import; | drive:\path\filename | | HTML Export | HTML Export; | drive:\path | | Text | Text; | drive:\path | | ODBC | ODBC; DATABASE=database; UID=user; PWD=password; DSN= datasourcename; [LOGINTIMEOUT=seconds;] | None | | Microsoft Exchange | Exchange 4.0; MAPILEVEL=folderpath; [TABLETYPE={ 0 | 1 }];[PROFILE=profile;] [PWD=password;] [DATABASE=database;] | drive:\path\filename.mdb |
Here are some Connect string samples:
'Access IXF1.Connect = "" IXF1.DatabaseName = "c:\...\test.mdb" IXF1.RecordSource = "SELECT CustomerID, ShippedDate FROM Orders"
'Text IXF1.Connect = "Text;" IXF1.DatabaseName = "C:\Directory"
'Excel 5.0 IXF1.Connect = "Excel 5.0;" IXF1.DatabaseName = "C:\...\Test.xls"
'SQLServer 7 IXF1.Connect = "ODBC;DSN=TestSQLServer7;SERVER=_ (local);UID=sa;PWD=;WSID=UserID;DATABASE=TestDB" IXF1.DatabaseName = "TestDB"
'InterBase IXF1.Connect = "ODBC;DSN=InterBaseTest;UID=SYSDBA;_ PWD=masterkey;DB=\\Server\InterBase\Employee.gdb" IXF1.DatabaseName = "InterBaseTest" 'This is the User Data Source Name
'Oracle IXF1.Connect = "ODBC;DSN=TestOra;UID=SCOTT;PWD=TIGER;"
|
|
Data Type
|
String
|