Skip to content

Latest commit

 

History

History
62 lines (50 loc) · 2.66 KB

configtranslator-function.md

File metadata and controls

62 lines (50 loc) · 2.66 KB
titledescriptionauthorms.authorms.datems.servicems.subservicems.topicf1_keywordshelpviewer_keywordsapilocationapinameapitype
ConfigTranslator Function
ConfigTranslator Function
David-Engel
davidengel
01/19/2017
sql
connectivity
reference
ConfigTranslator
ConfigTranslator [ODBC]
sqlsrv32.dll
ConfigTranslator
dllExport

ConfigTranslator Function

Conformance
Version Introduced: ODBC 2.0

Summary
ConfigTranslator returns a default translation option for a translator. It can be in the translator DLL or a separate setup DLL.

Syntax

 BOOL ConfigTranslator( HWND hwndParent, DWORD * pvOption); 

Arguments

hwndParent
[Input] Parent window handle. The function will not display any dialog boxes if the handle is null.

pvOption
[Output] A 32-bit translation option.

Returns

The function returns TRUE if it is successful, FALSE if it fails.

Diagnostics

When ConfigTranslator returns FALSE, an associated *pfErrorCode value is posted to the installer error buffer by a call to SQLPostInstallerError and can be obtained by calling SQLInstallerError. The following table lists the *pfErrorCode values that can be returned by SQLInstallerError and explains each one in the context of this function.

*pfErrorCodeErrorDescription
ODBC_ERROR_INVALID_HWNDInvalid window handleThe hwndParent argument was invalid or NULL.
ODBC_ERROR_DRIVER_SPECIFICDriver- or translator-specific errorA driver-specific error for which there is no defined ODBC installer error. The SzError argument in a call to the SQLPostInstallerError function should contain the driver-specific error message.
ODBC_ERROR_INVALID_OPTIONInvalid translation optionThe pvOption argument contained an invalid value.

Comments

If the translator supports only a single translation option, ConfigTranslator returns TRUE and sets pvOption to the 32-bit option. Otherwise, it determines the default translation option to use. ConfigTranslator can display a dialog box with which a user selects a default translation option.

Related Functions

For information aboutSee
Getting a translation optionSQLGetConnectAttr
Selecting a translatorSQLGetTranslator
Setting a translation optionSQLSetConnectAttr
close