Share via


LocalDBGetVersions Function

Returns all SQL Server Express LocalDB versions available on the computer.

Header file: sqlncli.h

Syntax

#define MAX_LOCALDB_VERSION_LENGTH 43
typedef 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

Remarks

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

See Also

Concepts

SQL Server Express LocalDB Header and Version Information