PDA

View Full Version : connection string



hobabi
یک شنبه 09 مرداد 1390, 14:48 عصر
ConnectionString=(@"Data Source=.SQLEXPRESS;AttachDbFilename="+Application .StartupPath +@"\D1.mdf;Integrated Security=True;User Instance=True");

دستور openکه میرسه خطای زیر میگیره

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)