I want to execute an sql statetement in my program and get the results from the output variable. I'll be using ADODB, but I'm not sure how to get the output returned from the following. Can anyone help?
DECLARE @data_dir varchar(500)
EXECUTE master.dbo.xp_instance_regread 'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\MSSQLServer\Setup',
'SQLDataRoot', @param = @data_dir OUTPUT
I need to get the value in @data_dir. Does anyone have some code example? I don't know the names of the input paramater for the xp_instance_regread stored procedure as this is an undocumented microsoft stored procedure.
Thanks
DECLARE @data_dir varchar(500)
EXECUTE master.dbo.xp_instance_regread 'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\MSSQLServer\Setup',
'SQLDataRoot', @param = @data_dir OUTPUT
I need to get the value in @data_dir. Does anyone have some code example? I don't know the names of the input paramater for the xp_instance_regread stored procedure as this is an undocumented microsoft stored procedure.
Thanks