问题在另一台PC上打开程序 [英] Problem With open program in another PC

查看:101
本文介绍了问题在另一台PC上打开程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


i制作程序用c#和sql express,我想在另一台PC上打开我的程序,我在我的用户PC上安装了sql express但是当我想打开程序时它给了我一个错误我该怎么办?要在另一台PC上打开吗?

这是我的sql连接

Hi i made program with c# and sql express and i want to open my program in another PC and i installed sql express in my user PC but when i want to open the program it give me an error what should i do to open it in another PC?
this is my sql connection

SqlConnection sql = new SqlConnection(@"server=.\SQLEXPRESS;database=student;integrated security=true;");



这就是问题

http://upload7.ir/imgs/2014-10/34014132393299938740.jpg [ ^ ]

尊重太空人


and this is the problem
http://upload7.ir/imgs/2014-10/34014132393299938740.jpg[^]
With Respect "Spaceman"

推荐答案

在SQL Server上使用集成安全性时,您连接的计算机上的用户帐户必须具有perm以访问该SQL服务器。



http://stackoverflow.com/questions/3998634/sql-server-2008-how-do-i-grant-privileges-to-a-username [ ^ ]
When using integrated security on SQL server your user account from the machine you are connecting with must have permission to access that SQL server.

http://stackoverflow.com/questions/3998634/sql-server-2008-how-do-i-grant-privileges-to-a-username[^]


嗯,它说'无法打开数据库'学生'(或多或少)



那么,您是否将数据库从您的开发人员复制/导入到这个'用户个人电脑'? (不确定移动或复制数据库的确切方法,但有关于如何部署数据库的文档)



- 或者,重新启动学生数据库在'用户'的电脑上从零开始



'g'
Well, it says 'Cannot Open Database "Student"' (more or less)

So, did you copy/import your database from your dev pc to this 'user pc' ? (not sure of the exact way to move or copy a database, but there are docs around on how to deploy it)

- or, re-init the Student database from scratch on the 'user' pc

'g'






根据错误消息,它似乎与权限相关。您需要为上述用户授予

学生数据库所需的权限。



谢谢
Hi,

As per the error messages , seems like it related to permission .You need to grant the necessary permissions to
student database for the mentioned user.

Thanks


这篇关于问题在另一台PC上打开程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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