Emmanuel, I find the following in sql 2k5 books online when I search for "attach. In other words, there are stored procs and t-sql commands available that seem to do the things you want.
3Attach the copied files to the instance of SQL Server 2005 by using the CREATE DATABASE statement with the FOR ATTACH or FOR ATTACH_REBUILD_LOG option. 5. Optionally, if you are making a copy of the database (instead of moving it), you can reattach the original database on the instance of SQL Server 7.0 or SQL Server 2000 by using the sp_attach_db or sp_attach_single_file_db stored procedure. From: advanced_delphi@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel Lamy Sent: Wednesday, September 03, 2008 9:16 PM To: advanced_delphi@yahoogroups.com Subject: [advanced_delphi] Re: AttachDatabase method equivalent in Delphi I am sorry if my question led you to confusion. What I want to accomplish is to use the data and log files from a SQL database to re- create the database on another machine, or on another instance of SQL Server. VB coders have the AttachDatabase method to do just that. My question was simply if there is a homologous method in delphi to achieve the same task, or if there is a way around the problem. Emmanuel --- In advanced_delphi@yahoogroups.com <mailto:advanced_delphi%40yahoogroups.com> , "Vo Viet Anh" <[EMAIL PROTECTED]> wrote: > > Hi Emmanuel, > The question is quite confusing. Can you please explain it a bit more in > details? With "SQL Server" did you might the ADOSQLConnection or > SQLConnection (in SQL Express) or whatelse? > > On Wed, 27 Aug 2008 10:14:50 +0700, Emmanuel Lamy <[EMAIL PROTECTED]> > wrote: > > > Hi everybody, > > > > Anyone knows if there is a Delphi method that accomplishes the same > > action as the VB "AttachDatabase" method that the VB programer can use > > to "attach" an existing database defined by one or several files to a > > defined instance of SQL Server? Or better, is there an alternative as > > to register an external SQL database file with another instance of a > > SQL Server, or SQL Express? Any hint or suggestions welcome. TIA. > > > > Emmanuel > > > > > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ >