嗨,我正在尝试将SQL服务器压缩数据库连接到我的程序,我想要一个删除数据库中所有条目的按钮,当我按下该按钮时程序抛出异常并给出以下错误消息"与网络相关或建立与SQL Server的连接时发生特定于实例的错误.找不到服务器或无法访问服务器.验证实例名称是否正确以及SQL Server是否配置为允许远程连接.(提供程序:SQL网络接口,错误: 26 - 找到指定的服务器/实例时出错""
请帮忙?=]
对不起,代码在下面=]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.SqlServerCe;
namespace Booking_system_Final
{
public partial class PendingJobs : Form
{
SqlConnection sc = new SqlConnection("Data Source=C:\\Users\\Administrator\\My Documents\\BMS_Data.sdf");
public PendingJobs()
{
InitializeComponent();
}
private void PendingJobs_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'bMSDataSet.Bookings' table. You can move, or remove it, as needed.
this.bookingsTableAdapter.Fill(this.bMSDataSet.Bookings);
// TODO: …Run Code Online (Sandbox Code Playgroud)