登录系统无法打开? [英] Login System cannot open?

查看:106
本文介绍了登录系统无法打开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生,这里有个问题.如您上周所见,一切正常,并且在调试模式下正常运行.但是我的伴侣不小心(> _<)改变了我的工作,现在它有一个我根本没有遇到过的错误.请帮帮我
建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:命名管道提供者,错误:40-无法打开与SQL Server的连接)
指向FoundUser = SearchUser.GetDataUser
我的代码如下

hello sir got a problem here. As you see last week everything works fine and im on the debugging mode. But my partner accidentally(>_<) change my work and now it has an error i havent encountered at all. Please help me
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
pointing at FoundUser = SearchUser.GetDataUser
my codes are as follows

Partial Class HomeLogIn
    Inherits System.Web.UI.Page

    Protected Sub btnLogIn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogIn.Click
        Dim SearchUser As New DataSet1TableAdapters.tblUserTableAdapter
        Dim FoundUser As New DataSet1.tblUserDataTable

        FoundUser = SearchUser.GetDataUser
        Dim Found As Boolean = False
        Session("UserID") = ""
        For Each Srow As DataSet1.tblUserRow In FoundUser
            If txtUserID.Text = Srow.UserID And txtPassword.Text = Srow.PassID Then
                Found = True
                Session("UserID") = txtUserID.Text

                Response.Redirect("Home.aspx")
            End If
        Next

        If Not Found Then
            '            Image1.Visible = True
            lblUserID.Visible = True
            lblUserID.Text = "Incorrect UserID or Password"
            Session("UserID") = txtUserID.Text
        End If
        If Found Then
            'lblUserID.Text = "Matagumpay ka!"
        End If
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        lblDate1.Text = DateTime.Today.ToString("dd-MMM-yyyy")
        txtUserID.Focus()
    End Sub
End Class

推荐答案

janwel 写道:

但是我的伙伴意外地(> _<)改变了我的工作,现在它有一个错误…

But my partner accidentally(>_<) change my work and now it has an error…

因此,在解决与您的SQL连接有关的问题之前,请对我们拥有代码的问题进行排序.您并不是真正的拥有者,因为您可以随时将其弄乱.我的建议是:停止做您正在做的事情,并开始在版本控制系统下工作.它是一种简单,廉价的必需资源和免费条款(如果您做出正确的决定并使用开源系统,请不要因为信任专有代码而冒着宝贵的代码断言的风险:他们会在今天但明天提供支持)可能会从市场上消失).

请参阅以下讨论:版本控制系统,您可以从中选择? [ ^ ],尤其是我的解决方案.

祝你好运,

—SA

So, before sorting out the problem with you SQL connection sort our the problem of owning your code. You''re not really own it, because you can mess it up any minute. My advice is: stop doing what you''re doing and start working under Revision Control System. It''s easy, inexpensive it terms of required resource and free of charge (if you make a right decision and use Open Source system; don''t risk your valuable code asserts by trusting a proprietary code: they support it today but tomorrow may disappear from the market).

See this discussion: Revision control systems, which to choose from?[^] in general and my solution in particular.

Good luck,

—SA


这篇关于登录系统无法打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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