
1、点击桌面上的“开始”图标。
2、点击右下角的“所有程序”按钮。
3、找到“Microsoft SQL Server 2008”文件夹,并点击。
4、点击“Microsoft SQL Server 2008”下的“配置工具”。
5、点击“配置工具”下的“Sql server配置管理器”。
6、右击带有“MSSQLSERVER”的选项,并点击“启动”选项。(有多项都是以那个结尾的,就要都点了)。这样就可以连接上了。
系统bug,网络问题。1、系统bug是vb.nettsql数据库软件系统出现了问题导致数据表不存在,等待官方修复即可。
2、网络问题是自身设备连接的网络出现较大波动,导致vb.nettsql数据库软件不存在,更换网络重新打开即可。
#region 判断数据库表是否存在,通过指定专用的连接字符串,执行一个不需要返回值的SqlCommand命令。/// <summary>
/// 判断数据库表是否存在,返回页头,通过指定专用的连接字符串,执行一个不需要返回值的SqlCommand命令。
/// </summary>
/// <param name="tablename">bhtsoft表</param>
/// <returns></returns>
public static bool CheckExistsTable(string tablename)
{
String tableNameStr = "select count(1) from sysobjects where name = '" + tablename + "'"
using (SqlConnection con = new SqlConnection(ConnectionString))
{
con.Open()
SqlCommand cmd = new SqlCommand(tableNameStr, con)
int result = Convert.ToInt32(cmd.ExecuteScalar())
if (result == 0)
{
return false
}
else
{
return true
}
}
}
#endregion
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)