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
spacegazer11
NA
18
0
I cannot connect to SQL Server. Also, how do I fill drop-down List with dataSet
Jan 30 2004 2:45 PM
ASP.Net WebForm, Visual C# private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) PopulateList(); } private void PopulateList() { SqlConnection myConnection = new SqlConnection("Persist Security Info = False; Integrated Security = SSPI; server = myServer; database = myDataBase; user = myUsername; password = myPassword"); myConnection.Open(); SqlDataAdapter query = new SqlDataAdapter("select columnName from tableName", myConnection); DataSet ds = new DataSet("tableName"); query.Fill(ds); myConnection.Close(); } My connection failure is likely at the server permission level, unless someone sees a coding error. Also, what code could I use to populate a ddl (drop-down list) with the data in the dataSet? Can anyone help me?
Reply
Answers (
0
)
Populating a dynamic comboBox in a WinForm using WebServices linked to a Db
OnItemCommand problem