I have a problem with the SqlConnection, the display can't open in Visual Studio
SqlConnection conn = new SqlConnection(@"D:\APLIKASI ALPEM\BISMILLAH\WINDOWSFORMSAPP1\LOGIN.MDF");
I have a problem with the SqlConnection, the display can't open in Visual Studio
SqlConnection conn = new SqlConnection(@"D:\APLIKASI ALPEM\BISMILLAH\WINDOWSFORMSAPP1\LOGIN.MDF");
Your path to database file contains space, so should be taken with double quotes at the beginning and the end. Try this:
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "DataSource=.\\SQLEXPRESS; AttachDbFilename=\"D:\\APLIKASI ALPEM\\BISMILLAH\\WINDOWSFORMSAPP1\\LOGIN.MDF\";Integrated Security=True;User Instance=True";