大约一年前,我开始在 Visual Studio 2013 中开发一个应用程序。数据库是 SQL Server Express 版本。
我现在才回过头来。我已将 VS 升级到 2015 社区版并想使用数据库。但是我打不开。我收到的错误是:
连接字符串中的数据源值指定未安装的 SQL Server 实例。要解决此问题,您可以选择安装匹配的 SQL Server 实例或修改连接字符串中的数据源值。
我试图找出旧数据库的版本,以便我可以安装正确的版本或更改连接字符串。如何找出数据库所在的 SQL Server Express 版本?
为什么这个Application对象没有实例化?每当我运行代码时它都为null.
public class Applicant
{
private Application oApplication = new Application();
public Applicant()
{
oApplication = new Application();
}
public Application Application
{
get { return oApplication; }
set { oApplication = value; }
}
}
Run Code Online (Sandbox Code Playgroud)
这是应用程序类
public class Application
{
public string ApplicationID { get; set; }
public ContactDetails ContactDetails { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
这是调用代码....
public Applicant[] GetApplicants()
{
Applicant[] oApplicant;
DataSet dsExcelSchema = new DataSet();
dsExcelSchema = GetDataAsDataSet();
DataTable contactInfoTable = dsExcelSchema.Tables["ContactInformation$"];
int numOfApplications = contactInfoTable.Rows.Count - …Run Code Online (Sandbox Code Playgroud)