Using Win32 functions in Visual FoxPro Image Gallery
ODBC API
..msdn
SQLAllocEnv
SQLAllocHandle
SQLBindCol
SQLBrowseConnect
SQLConfigDataSource
SQLConnect
SQLCreateDataSource
SQLDataSources
SQLDisconnect
SQLDriverConnect
SQLDrivers
SQLExecDirect
SQLFetch
SQLFreeEnv
SQLFreeHandle
SQLGetConfigMode
SQLGetConnectAttr
SQLGetDiagRec
SQLGetEnvAttr
SQLGetFunctions
SQLGetInfo
SQLGetInstalledDrivers
SQLGetPrivateProfileString
SQLInstallerError
SQLManageDataSources
SQLNativeSql
SQLRowCount
SQLSetConfigMode
SQLSetEnvAttr
SQLTables
Code examples:
How to retrieve list of system DSNs (Data Source Name) with parameters
SQLGetPrivateProfileString
..msdn    Add comment     W32 Constants      Translate this page
SQLGetPrivateProfileString gets a list of names of values or data corresponding to a value of the system information.
Code examples:
How to retrieve list of system DSNs (Data Source Name) with parameters
Declaration:
 
int SQLGetPrivateProfileString(
    LPCSTR lpszSection,
    LPCSTR lpszEntry,
    LPCSTR lpszDefault,
    LPCSTR RetBuffer,
    INT cbRetBuffer,
    LPCSTR lpszFilename
);
 
FoxPro declaration:
 
DECLARE INTEGER SQLGetPrivateProfileString IN odbccp32;
    STRING    lpszSection,;
    STRING    lpszEntry,;
    STRING    lpszDefault,;
    STRING  @ RetBuffer,;
    INTEGER   cbRetBuffer,;
    STRING    lpszFilename
 
 
Parameters:
lpszSection
[Input]
Points to a null-terminated string that specifies the section containing the key name.

lpszEntry
[Input]
Points to the null-terminated string containing the key name whose associated string is to be retrieved.

lpszDefault
[Input]
Points to a null-terminated string that specifies the default value for the given key if the key cannot be found in the initialization file.

RetBuffer
[Output]
Points to the buffer that receives the retrieved string.

cbRetBuffer
[Input]
Specifies the size, in characters, of the buffer pointed to by the RetBuffer argument.

lpszFilename
[Output]
Points to a null-terminated string that names the initialization file.
Return value:
SQLGetPrivateProfileString returns an integer value that indicates the number of characters read.
My comment:
MSDN: SQLGetPrivateProfileString is provided as a simple way to port drivers and driver setup DLLs from Microsoft® Windows® to Microsoft Windows NT®/Windows 2000.

Calls to GetPrivateProfileString that retrieve a profile string from the Odbc.ini file should be replaced with calls to SQLGetPrivateProfileString. SQLGetPrivateProfileString calls functions in the Win32® API to retrieve the requested names of values or data corresponding to a value of the Odbc.ini subkey of the system information.

The configuration mode (as set by SQLSetConfigMode) indicates where the Odbc.ini entry listing DSN values is in the system information.

If the DSN is a User DSN (the configuration mode is USERDSN_ONLY), the function reads from the Odbc.ini entry in HKEY_CURRENT_USER. If the DSN is a System DSN (SYSTEMDSN_ONLY), the function reads from the Odbc.ini entry in HKEY_LOCAL_MACHINE. If the configuration mode is BOTHDSN, HKEY_CURRENT_USER is tried, and if it fails, HKEY_LOCAL_MACHINE is used.
Word Index links for the SQLGetPrivateProfileString :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-01-22 17:30:43
Modified: 2003-01-22 17:35:55
Visited in last 7 days: 22
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.79.128)
7 sec.Function: 'waveOutGetErrorText'
13 sec.Function: 'GetSecurityDescriptorDacl'
22 sec.Function: 'WinHttpConnect'
31 sec.Function: 'waveInClose'
41 sec.Function: 'ConvertSidToStringSid'
Function group: 'Security'
52 sec.Function: 'PathFindFileName'
1.05 min.Function: 'SQLManageDataSources'
1.25 min.Function: 'CertFindCertificateInStore'
1.45 min.
Function group: 'MSHTML Reference'
1.67 min.Function: 'GdipGetPropertyCount'
Google
Advertise here!