"Unable to open the physical file "e:\dbForATTWithPWD.mdf". Operating system error 2: "2(error not found)""
Dim conn As New SqlConnection("Server=MyHomeServer\SQLExpress;Database=master;Integrated Security=SSPI") Dim cmd As New SqlCommand("", conn) cmd.CommandText = "CREATE DATABASE MyHomeWithPWD ON ( FILENAME = 'e:\dbForATTWithPWD.mdf' ), ( FILENAME = 'e:\dbForATTWithPWD_log.ldf' ) FOR ATTACH" conn.Open() cmd.ExecuteNonQuery() cmd.Dispose() conn.Dispose()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)