Hi,
I have created a button called "DBAttached" using delphi and i would like to attached a
MSSQL DB by clicking on this button. i am using the following
query
Code:
CREATE DATABASE [database_name] ON
( FILENAME = 'C:\Program Files....\test.MDF'),
( FILENAME = 'C:\Program Files ....\test_log.LDF')
FOR ATTACH ;
but when i run the program and click on the button , i get the error "test.MDF" kann nicht geöffnet werden. Betriebssystemfehler 5: "5(Zugriff verweigert)".
if i run the
SQL server management studio as a administrator, then i can attached/dittached any
DB using
SQL server management studio only,
but how i can do the same using delphi as well?