Hi,
i need to access registry settings from SQL Server 2000 stored procedures.

So i'm using xp_regread extended procedure to access. But it's not always working properly.

Code:
declare @Test varchar(50)
exec master..xp_regread @rootkey='HKEY_CURRENT_USER',
@key='Software\ODBC\ODBC.INI\ODBC Data Sources', 
@value_name='Visual FoxPro Database', @value=@test OUTPUT

SELECT @test

But it's Showing


Code:
Msg 22001, Level 1, State 22001
RegOpenKeyEx() returned error 2, 'The system cannot find the file specified.'
                                                   
-------------------------------------------------- 
NULL

(1 row(s) affected)
Can any one help me pls?