在另一台PC上运行项目 [英] Running the Project on Another pc

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

问题描述

我想在另一台计算机上运行.net项目.我已经更改了pc名称,并且该项目运行正常.但是该页面存在数据集.该页面无法正常工作,因为安装在此计算机上的sql与用户名和密码,以前的机器处于窗口身份验证模式.当我编译该项目时,该项目运行良好,但在运行时页面上出现了数据集错误,导致登录失败.... so,请帮助我.

I want to run my .net project on another machine .I have Change The pc Name and the project is working Fine.But The page were dataset is there That page is not Working because sql which is installed in this machine is with username and password and previously machine was in window authentication mode.when i compile the project the project is working fine but on run time page with dataset throw a error of login failed....so please helpme out.

推荐答案

SqlConnection connection = new SqlConnection();

connection.ConnectionString = @"Data Source=Server_Name/Server_IP;
                                Initial Catalog=Database_Name;
                                User Id=Your_UserId;
                                Password=Your_Password";


http://www.vkinfotek.com/gridview/binding-gridview-dataset.html

http://msdn.microsoft.com/zh-cn/library/fkx0cy6d.aspx
http://www.vkinfotek.com/gridview/binding-gridview-dataset.html

http://msdn.microsoft.com/en-us/library/fkx0cy6d.aspx


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

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