'How do I' question

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 101
Joined: Tue 01 May 2007 16:36

'How do I' question

Post by ccmcbride » Mon 16 Jul 2007 20:23

I am trying to work out how to

1) Detach a database
2 )Zip the files
3) Reattach the database.

I'm pretty sure I can figure out the SQL statements for 1 and 3, but to do 2, I need to figure out the physical file names. Does anyone know of a way to do this, either using sDac components, or using SQL?

Thanks in Advance

Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 18 Jul 2007 09:23

You can try to use the sp_helpfile system stored procedure:

Code: Select all

exec sp_helpfile 'test'
Tou can read about sp_helpfile in MSDN

Post Reply