Question : Must declare the scalar variable?

Hi, when I run the code below, I am getting the error:
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@vcHelloDB".

What's wrong with my code below and how should I change the code to make it work?(I really want to use the variable '@vcHelloDB' instead of writing a full path)

Use master
declare            
      @vclogPath        varchar (255),
      @vcHelloDB          varchar (255)

SET @vcHelloDB = 'D:\Database\hello.BAK'
            
--Create Table #tempHello here
            
Insert #tempHello
EXEC('RESTORE FILELISTONLY FROM DISK = @vcHelloDB')

Answer : Must declare the scalar variable?

this will work better
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Use master
declare            
      @vclogPath        varchar (255),
      @vcHelloDB          varchar (255) 
SET @vcHelloDB = 'D:\Database\hello.BAK'
            
--Create Table #tempHello here
            
Insert #tempHello
EXEC('RESTORE FILELISTONLY FROM DISK = ''' + @vcHelloDB + ''' ')
Random Solutions  
 
programming4us programming4us