Selecting Provider - OLE DB Provider for Teradata

OLE DB Provider for Teradata User Guide

Product
OLE DB Provider for Teradata
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2498
Product Category
Teradata Tools and Utilities

Selecting Provider

To selecting an OLE DB provider

1 In the OLE DB Providers list, click OLE DB Provider for Teradata to highlight it.

2 Click Next.

The Connection tab opens.

Entering Login Information

To enter login information

1 In the Data Source field, enter the system name of the system running Teradata Database.

2 In the User name field, enter the Teradata user ID.

3 In the Password field, enter the password for the Teradata user ID.

Entering the Connection Timeout Value

To enter a Connection Timeout value

1 In the Data Link Properties box, click the Advanced tab.

2 In the Connect timeout field, enter the number of seconds for the connection timeout.

Note: Access permissions in this dialog box have no effect.

Verifying Entries

To verify entries

1 In the Data Link Properties box, click the All tab.

2 Examine the initialization values to be sure they are all correct. Use the Edit Value button to make changes.

Leave the Data Link Properties box open to enter the provider string.

Entering a Provider String

To enter a provider string

1 In the All tab of the Data Link Properties box, double click Extended Properties,

OR

Highlight Extended Properties and then click Edit Value.

The Edit Property Value dialog box appears.

2 In the Edit Property Value dialog box:

a Enter the provider string in the Property Value field.

b Click OK.

The provider string appears in the All tab Extended Properties field.

3 Data Link Properties In the box, click OK.

The Data Link Properties box closes.

Example – Visual C++

This Visual C++ example uses the IDBPromptInitialize::PromptDataSource method.

#include <oledb.h>
#include <oledberr.h>
#include <msdasc.h>
#include <oleauto.h>
 
void main()
{
HRESULT                hr; 
PCLSID                 pclsid = NULL;     
IDBPromptInitialize    *pIDBPromptInitialize = NULL;
IDBInitialize          *pIDBInitialize = NULL;
ICommand               *pICommand = NULL;
 
 
 
//*************************************************
// Error handling is not included in this example. 
//**************************************************
 
hr = CoCreateInstance(CLSID_DataLinks, 
     NULL, 
     CLSCTX_INPROC_SERVER, 
     IID_IDBPromptInitialize, 
     (void **)&pIDBPromptInitialize);
 
 
// Getting the window handle so that it can be passed to the
// PromptDataSource method.
 
HWND  hwnd = GetDesktopWindow();
 
 
// Calling method to allow user to enter information needed to 
// initialize properties for initializing Data Source.
 
hr = pIDBPromptInitialize->PromptDataSource(NULL, 
hwnd, 
DBPROMPTOPTIONS_PROPERTYSHEET, 
0, 
NULL, 
NULL, 
IID_IDBInitialize, 
(IUnknown **)&pIDBInitialize);
 
 
// Initialize the Data Source object.
 
hr= pIDBInitialize->Initialize();
 
//-------------------------------------------------------------
//
// REST OF PROGRAM …
//
//-------------------------------------------------------------
 
// At the end of the program the program must release all objects
 
pIDBInitialize->Release();
pIDBPromptInitialize->Release();
}