使用sqlserver运行程序时出错 [英] Error while running program with sqlserver

查看:220
本文介绍了使用sqlserver运行程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,
我创建安装文件并将其安装在另一台PC上.
运行该软件时,将显示如下错误:
建立到sql server时发生与网络有关或特定于实例的错误.找不到服务器或无法访问该服务器.请验证实例名称正确且sql server为"
我的连接字符串是:
con ="server =.,database = book,integrated security = sspi";

请帮忙.什么问题? .

dear friends,
i create setup file and instal it on another PC.
when run the software an error will show like this:
"A network related or instance-specific error occured while establishing to sql server.the server was not found or was not accessible.verify that the instance name is correct and that sql server is "
my connection string is:
con="server=.,database=book,integrated security=sspi";

please help.what is the problem? .

推荐答案

您的服务器名丢失,我想如果您使用的是SQL Express,请使用.\ SQLEXPRESS

所以您的连接字符串看起来像
con ="server =.\ sqlexpress,database = book,integrated security = sspi";

如果您的服务器名是mostafaPC,则更新,然后

con ="server = MostafaPc,database = book,integrated security = sspi";
your servername is missing, I think if you are using sql express then use .\SQLEXPRESS

so your connection string looks something like
con="server=.\sqlexpress,database=book,integrated security=sspi";

updated if ur servername is mostafaPC, then

con="server=MostafaPc,database=book,integrated security=sspi";


这篇关于使用sqlserver运行程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆