Post the query you are using. Also see if this article helps you. If you are using xp_regread, its an undocumented function, so the expert advice is to avoid using them if you can. See here
By the way, I am no expert on RegQueryValueEx or on xp_regread. All my expertise comes from couple of minutes of binging the web.
Please below query which i am using
Yes , its undocumented , but is there any other way to read registry key value using sql server ?
DECLARE @value VARCHAR(100)