0

I've already seen all other post and seems cant help me.

String constr = (@"Data Source=(localdb)\MSSQLLocalDB;
        AttachDbFilename= E:\Downloads Mainframe\Compressed\Main Menu\HRDAssets.mdf;
        initial catalog=HRDAssets; 
        Integrated Security=True;");

https://cdn.discordapp.com/attachments/268002637905920001/506753130848059394/unknown.png

When I removed

AttachDbFilename= E:\Downloads Mainframe\Compressed\Main Menu\HRDAssets.mdf;

new problem pops

https://cdn.discordapp.com/attachments/506763196225421312/506763211492556800/unknown.png

zero323
  • 322,348
  • 103
  • 959
  • 935
Nanoticon
  • 9
  • 3

1 Answers1

0

Remove this line from the connection string

AttachDbFilename= E:\Downloads Mainframe\Compressed\Main Menu\HRDAssets.mdf;

and Initial Catalog property I suggest to use:

Data Source=(LocalDb)\MSSQLLocalDB;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\HRDAssets.mdf
Anas Alweish
  • 2,818
  • 4
  • 30
  • 44