C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




database


Posted Date: 29 Aug 2008      Total Responses: 1

Posted By: kalaimanichozhan       Member Level: Gold     Points: 1


how to get all database name in Sqlserver into arraylist.



Responses

Author: Sandeep Chougule    30 Aug 2008Member Level: GoldRating:     Points: 5
Hi check this
All database name inserted into combo
Same this u can add names in Array list



cmm = new SqlCommand();
cmm.Connection = con;
cmm.CommandType = CommandType.Text;
cmm.CommandText = " select name from sys.databases";
SqlDataAdapter da = new SqlDataAdapter(cmm);
DataTable dt = new DataTable();
da.Fill(dt);
DataView dv=new DataView(dt);
cmbDatabase.DataSource = dv;
cmbDatabase.DataTextField = "name";
cmbDatabase.DataBind();
con.Close();



Post Reply
You must Sign In to post a response.
Next : tablename
Previous : SQL Query Migration Dll in .net?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

internet fax

Contact Us    Privacy Policy    Terms Of Use