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
saifullah khan
NA
335
300.6k
Cannot open database "E_learning" requested by the login. The login failed.
Oct 26 2011 5:40 AM
i have created an application that takes a file and save it into database. here is the code
int len = FileUpload1.PostedFile.ContentLength;
byte[] pic = new byte[len];
FileUpload1.PostedFile.InputStream.Read(pic, 0, len);
cnn.Open();
cmd = new SqlCommand("insert into images values='" + pic + "'", cnn);
cmd.ExecuteNonQuery();
but when i click on upload it gives me the following error
Cannot open database "E_learning" requested by the login. The login failed.
i knw it is due to i have not used the uid and pwd options in db connection string. actually i am using the windows authentication mode in sql server. there is no user created for login through sql authentication mode. although i have created one. but i doesnt work. can somebody solve my problem?
Reply
Answers (
1
)
asp.net ,vb.net
Latency modes of Garbage collection