问题超出了存储过程的数据库 [英] Problem excessing database with stored procedure

查看:62
本文介绍了问题超出了存储过程的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当我从其他计算机访问Web应用程序时,我的Web应用程序遇到问题,然后Web服务器出现错误,即无法从用户访问数据库,拒绝了多余的信息",这是与存储过程有关的事情,因为粘贴之后地址栏首页上的链接出现了,但是当我在给所有输入应用程序后单击下一步按钮时,该数据库被拒绝了.

这是我用于与存储过程进行连接的代码:

Hi All,

I am facing a problem in my web application while accessing it from a computer other then the web server an error is come that is "can not access database from user sa excess is denied" i thing this is something related to stored procedure because after pasting link in the address bar first page comes but when i click the next button after giving all the inputs application shows this database excess denied.

This is the code i am using for connectivity with stored procedure :

SqlConnection conn = new SqlConnection("Data Source=TECH4; Database=test_vs; Integrated Security=SSPI");
        SqlCommand command = new SqlCommand("p1", conn);
        command.CommandType = CommandType.StoredProcedure;
        command.Parameters.Add("@agent_name", SqlDbType.VarChar).Value = TextBox1.Text;
        command.Parameters.Add("@phone_number", SqlDbType.VarChar).Value = TextBox2.Text;
        command.Parameters.Add("@uid", SqlDbType.VarChar).Value = TextBox3.Text;
        conn.Open();
        command.ExecuteNonQuery();
        conn.Close();

推荐答案

您正在使用DSN-因此,应在要与DB连接的任何客户端计算机上配置此DSN. .

另外请注意,您不应在公共论坛上添加用户名和密码.
You are using a DSN - so you should configure this DSN on any client machine that is to connect with the DB.

As another note, you should not include the username and password on a public forum.


这篇关于问题超出了存储过程的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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