I am trying to make a simple little program to determine what version of SQL a .bak file was created. Is there anyway to run: RESTORE HEADERONLY FROM FILE = 'Path', so then you can grab the "Version Number" column that is returned?

I think it can be done, but not everyone will have access to the same SQL Server instance, so the connection string is that main part where I am confused.

Thank you for any help or suggestions.