Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 2.43 KB

File metadata and controls

61 lines (47 loc) · 2.43 KB
title LocalDBGetVersions Function | Microsoft Docs
ms.custom
ms.date 03/06/2017
ms.prod sql
ms.prod_service database-engine
ms.reviewer
ms.technology
ms.topic reference
apiname
LocalDBGetVersions
apilocation
sqluserinstance.dll
apitype DLLExport
ms.assetid 033a9c6b-0d7f-4f8a-ab60-33cd6fee0d33
author CarlRabeler
ms.author carlrab

LocalDBGetVersions Function

[!INCLUDEappliesto-ss-xxxx-xxxx-xxx-md] Returns all SQL Server Express LocalDB versions available on the computer.

Header file: sqlncli.h

Syntax

#define MAX_LOCALDB_VERSION_LENGTH 43typedef WCHAR TLocalDBVersion[MAX_LOCALDB_VERSION_LENGTH + 1];typedef TLocalDBVersion* PTLocalDBVersion;HRESULT LocalDBGetVersions(           PTLocalDBVersion pVersion,           LPDWORD lpdwNumberOfVersions);  

Parameters

pVersionNames
[Output] Contains names of the LocalDB versions that are available on the user's workstation.

lpdwNumberOfVersions
[Input/Output] On input holds the number of slots for versions in the pVersionNames buffer.
On output, holds the number of existing LocalDB versions.

Returns

S_OK
The function succeeded.

LOCALDB_ERROR_NOT_INSTALLED
SQL Server Express LocalDB is not installed on the computer.

LOCALDB_ERROR_INVALID_PARAMETER
One or more specified input parameters are invalid.

LOCALDB_ERROR_INSUFFICIENT_BUFFER
The input buffer is too short, and truncation was not requested.

LOCALDB_ERROR_INTERNAL_ERROR
An unexpected error occurred. See the event log for details.

Remarks

For a code sample that uses LocalDB API, see SQL Server Express LocalDB Reference.

See Also

SQL Server Express LocalDB Header and Version Information