Helpful Information
 
 
Category: ASP.NET
SQL client error!

Hi, recently i have setup a SQL server and i have occur a few problems.

1) I have tried connecting to the SQL server on my client using SQL enterprise manager. And no error occurs. But when i tried using ASP.NET connecting to the SQL server on my client, there is an error which shows,
SQL Server does not exist or access denied.

2) i wonder if there's any setting i need to set on SQL server? or in my ASP.NET, please help

below are the codes:-

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim cn As New SqlConnection("server=FYPSERVER;uid=sa;pwd=ckpuni123;database=FYPGamePortal")
Dim cmd As New SqlCommand("Select * from tblNews", cn)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New DataSet

da.Fill(ds, "tblNews")

DropDownList1.DataTextField = "intNewsID"
DropDownList1.DataSource = ds.Tables("tblNews")
DropDownList1.DataBind()


End Sub


please help, thanks alot

Hi hiryu23,
We do have a forum specifically for asp.net questions, i'll be moving your thread over. But There could be several causes to your error you specified, check out Potential causes of the "SQL Server does not exist or access denied" error message (http://support.microsoft.com/default.aspx?scid=kb;en-us;328306)

I have always used a local ODBC entry to point to the SQL/mySQL server on my computer. I have found it was just easier.










privacy (GDPR)