Pravin Ghadge

Pravin Ghadge

  • 562
  • 2.1k
  • 586.6k

Device Activation Error

Dec 21 2010 5:35 AM

Hi,
Iam using Sql 2000 as Back End
Iam attaching Database at runtime.
I have used foll code to attach database:
vConn.ConnectionString =
"Data source=Localhost;uid=" + UID + ";pwd=" + UPWD + ";database=Demo;AttachDbFileName=|DataDirectory|Demo.MDF;";
But while running code it giving me foll error:
Device activation error. The physical file name 'C:\Documents and Settings\admin\Desktop\Demo\Demo\bin\Debug\Demo.MDF' may be incorrect.
Could not attach database 'Demo' to file 'C:\Documents and Settings\admin\Desktop\Demo\Demo\bin\Debug\Demo.MDF'.
 
Plz help me out!

Answers (10)