TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
guoht03
NA
1
0
Can't access sql server
Nov 19 2003 12:42 AM
origin codes follow below: SqlConnection myConnection = new SqlConnection("server=(local)\\COLIN;database=pubs;Trusted_Connection=yes"); SqlDataAdapter myCommand = new SqlDataAdapter("select * from Authors", myConnection); DataSet ds = new DataSet(); myCommand.Fill(ds, "Authors"); the error follows below: SQL Server dosen't exist or access has been denied. Exception details: System.Data.SqlClient.SqlException: SQL Server dosen't exist or access has been denied. line 14: line 15: DataSet ds = new DataSet(); line 16: myCommand.Fill(ds, "Authors"); ---------error occurs here line 17: line 18: MyDataGrid.DataSource=ds.Tables["Authors"].DefaultView I've tried to modify the security setting of sql server but the error still exists. I'm sure that instance of sql server named COLIN is running. It seems that my access has been denied. Can any one help me? Thanks!
Reply
Answers (
3
)
Creating an EventLog
ASP.NET Validation