|
|
|||||||
Hi, Where can I find some info or example code to attach a .mdf and .log file to a new installation of msde? have searched but missed the right one!! Thanks Peter |
||||||||
|
|
|||||||
The easiest way is to use the Microsoft SQL-DMO COM objects. The object from that library you want to look at is SQLServer which contains a method called 'AttachDB'. It takes a multistring value to grab both the .mdb/.ldb files. Should give you just what you want. |
||||||||
|
|
|||||||
And that would be: Code:
Also see: MS page on SP_ATTACH_DB |
||||||||
|
|
|||||||
And this can be done outside of the regular GUI Tools using osql. Kent |
||||||||
|
|
|||||||
OK thanks, Wil give the osql tool a try Peter |