Troubleshooting - Programming - Teradata Meta Data Services

Teradata Meta Data Services User Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
Product Category
Teradata Tools and Utilities

Troubleshooting - Programming

The following is troubleshooting information regarding programming with the MDS APIs.

 

Table 23: Troubleshooting - Programming 

Problem

Possible Fix

Internationalized functions

When an application needs the internationalized functions working under _MBCS or _UNICODE settings, the application developer must set the locale in the application.

You can set the locale dynamically in your application based on the Windows locale setting as follows:

//*** Get User Locale Info.

lcid = GetUserDefaultLCID(); // get locale ID here

GetLocaleInfo(lcid, LOCALE_SABBREVLANGNAME, m_lpszLangU, 4);

GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, m_lpszLangEng, 20);

// setlocale(LC_ALL, "target_language");

setlocale(LC_ALL, m_lpszLangEng);

Windows program built using the MDS C++ APIs terminates at the end of the program with an access violation.

C++ Applications (console applications or DLLs) using the MDS APIs must set the C/C++ Code Generation Category to Use run-time library: Multithreaded DLL. If an executable is built using the Multithreaded library instead of the Multithreaded DLL library, an access violation will occur during program termination.