>Server Error in '/' Application.
>------------------------
>SQL Server does not exist or access denied.
>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
>Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
>Source Error:
>
>Line 23: Dim sText As String = "SELECT employeeid, firstname, lastname FROM Employees"
>Line 24: Dim cmd As SqlDataAdapter= New SqlDataAdapter(sText, sConn)
>Line 25: cmd.Fill(ds, "EmpTable")
>Line 26:
>Line 27: Session("MyData") = ds
>
>Source File: c:\inetpub\wwwroot\FormViewer.aspx Line: 25
and my connection string is :
>"server=localhost;uid=sa;Initial Catalog=Northwind;"
i tried a lot of codes but it doesn't work in sql server 2k but in mysql server it perfectly run. i installed my web server in my local machine with .net framework but my sql server 2k is installed in other machine with the domain controller setup. how im going to connect to my sql server 2k using asp.net codes. i learn some ideas that it better to code the connection string in web.config. is it ok? please please help me. im really out of mind.hi everybody, im a newbie in asp.net. my current language is vb/sqlserver2k. i have a problem in connecting asp.net to sql server2k because my sql server2k is installed in other machine and my web server is installed in my local machine together with my .net framework. i tried a lot of examples but none of this is working with application, it shows with an error "SQL Server does not exist or access denied."
can you give me a complete source step by step. i would really appreciate if anybody can help. thanks in advance|||Tryhttp://www.connectionstrings.com for connection string help. If you still can't get it working, is your SQL Server using SQL authentication or Windows authentication? What does your connection string look like (be sure not to post actual user names and passwords if you are using SQL authentication)?
Edit: I found your duplicate post on the same topic and joined it to this thread. Please do not post the same question multiple times. It only frustrates those who are trying to help you and dilutes the effort.|||how can i know what authentication am i using, sql authentication or windows authentication?
all i know that in my vb application i was using this connection string to connect to my sql server "provider=sqloledb;database=xxxx;server=xxxx;uid=xxx;pwd=xxxx" is that so simple in my vb but in asp.net i really don't know what is the correct connection. thanks anyway tmorton for your reply|||Use the connection string example under SQL Server, SqlConnection, Standard Security at connectionstrings.com.
You are using SQL authentication since you are using a user name and password to connect. If you were using Windows authentication there would be no user name or password; the credentials of the current user would be used.
No comments:
Post a Comment