Distributed Tuning Interface Reference : PvModifyDSN()
 
PvModifyDSN()
Modifies an existing data source name.
Header File: catalog.h (See also Header Files)
Function First Available In Library: w3dbav78.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (macOS) (See also Link Libraries)
This function is deprecated in PSQL v11 and higher versions. Use the ODBC API to work with client DSNs.
Syntax
BTI_API PvModifyDSN(
   BTI_LONG       hConnection,
   BTI_CHAR_PTR   pdsnName,
   BTI_CHAR_PTR   pdsnDesc,
   BTI_CHAR_PTR   pdsnDBQ,
   BTI_LONG       openMode);
Arguments
 
In
hConnection
Connection handle that identifies the server. Connection handles are obtained with the PvConnectServer() function.
In
pdsnName
Name of the DSN to modify.
In
pdsnDesc
New description for the DSN.
In
pdsnDBQ
New Database name for the DSN.
In
openMode
New Open mode for the DSN, which is one of the following:
NORMAL_MODE
ACCELERATED_MODE,
READONLY_MODE
EXCLUSIVE_MODE
See also DSN Open Mode in ODBC Guide.
Return Values
 
P_OK
The operation was successful.
P_E_INVALID_HANDLE
Invalid connection handle.
P_E_NULL_PTR
Call with NULL pointer.
P_E_DSN_DOES_NOT_EXIST
The specified DSN name does not exist.
P_E_ACCESS_RIGHT
Insufficient access right for the operation.
P_E_INVALID_OPEN_MODE
The specified open mode is invalid.
P_E_FAIL
Failed to retrieve data path.
Remarks
The following preconditions must be met:
DTI session started by calling PvStart()
Connection established by PvConnectServer() or if you are performing the operation on a local machine, P_LOCAL_DB_CONNECTION may be used as the connection handle.
See Also
PvStart()
PvConnectServer()
PvListDSNs()
PvCreateDSN()
PvGetDSN()
PvGetDSNEx()
PvDeleteDSN()
PvCountDSNs()
PvStop()