if RetCode <> SQL_SUCCESS then
Exit;
GetMem(ConnStrOut, ConnStrOutMax);
RetCode := SQLBrowseConnect(HDBC, PSQLCHAR(ConnStrIn), SQL_NTS, ConnStrOut,
ConnStrOutMax, @cbConnStrOut);
if RetCode <> SQL_ERROR then
begin
TmpStr := PChar(ConnStrOut);
if InfoType = itLanguage then
Delete(TmpStr, 1, AnsiPos(''};'', TmpStr) + 1);
Delete(TmpStr, 1, AnsiPos(SplitterStr, TmpStr) + 1);
Delete(TmpStr, AnsiPos(''}'', TmpStr), Length(TmpStr));
while TmpStr <> '''' do
begin
TmpPos := AnsiPos('','', TmpStr);
if TmpPos > 0 then
AList.Add(Copy(TmpStr, 1, TmpPos - 1))
else
begin
AList.Add(TmpStr);
TmpStr := '''';
end;
Delete(TmpStr, 1, TmpPos)
end;
Result := True;
end;
FreeMem(ConnStrOut, ConnStrOutMax);
finally
if Assigned(HDBC) then
begin
SQLDisconnect(HDBC);
SQLFreeHandle(SQL_HANDLE_DBC, HDBC);
HDBC := nil;
end;
if Assigned(HENV) then
begin
SQLFreeHandle(SQL_HANDLE_ENV, HENV);
HENV := nil;
end;
end;
end;