| | |
Displaying a list of Databases in a combo box
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2006
Posts: 17
Reputation:
Solved Threads: 0
Hi all, (First Post...YEEERROOO)
Quick question for ya all, I have an MySQL server with three databases created on it, lets say test, test_1 and test_2. Is there a way that I can display what ever databases are stored on the server in a combo box?
I want to allow the user to be able to choose which database they want to coneect to. Any help would be cool
BTW Im using VB.net on VS2005
Quick question for ya all, I have an MySQL server with three databases created on it, lets say test, test_1 and test_2. Is there a way that I can display what ever databases are stored on the server in a combo box?
I want to allow the user to be able to choose which database they want to coneect to. Any help would be cool

BTW Im using VB.net on VS2005
•
•
Join Date: Mar 2007
Posts: 5
Reputation:
Solved Threads: 1
PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load Dim conn As New ADODB.Connection() Dim rs As New ADODB.Recordset() Dim connStr, sSQL As String Dim Results, i As Integer connStr = "Provider=SQLOLEDB.1;Initial Catalog=xxxx;Data Source=x.x.x.x;User ID=sa;Password=xxXXxx;Application name = New_Businessnew" conn.Open(connStr) sSQL = "sp_helpdb" rs = conn.Execute(sSQL, Results) rs.MoveNext() Do While Not rs.EOF And Not rs.BOF cb.Items.Add(rs.Fields("Name").Value) rs.MoveNext() Loop rs.Close() End Sub
Last edited by molze; Mar 23rd, 2007 at 9:20 pm. Reason: syntax error
![]() |
Similar Threads
- Combo Box (VB.NET)
- Selecting mutiple data options in Access2003 listbox or combo box (MS Access and FileMaker Pro)
- Combo box and Ms-access (JSP)
- query with combo box input (MS Access and FileMaker Pro)
- Combo Box (C#)
- how do i restrict usersfrom entering a specific value in a combo box? (Visual Basic 4 / 5 / 6)
- Perplexed: Combo Box Not Holding Data (C#)
Other Threads in the VB.NET Forum
- Previous Thread: anyone know how to append in integer
- Next Thread: How I can display selected value from combo box in data grid view using VB.Net?
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array basic beginner bing browser button buttons center check code crystalreport cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel fade file-dialog filter forms ftp generatetags google hardcopy html images input insert intel internet mobile monitor ms net networking objects open output panel passingparameters pdf picturebox picturebox1 port position printing problem project save searchbox searchvb.net select serial settings shutdown soap sqlserver survey tcp temperature text textbox timer timespan toolbox transparency trim update user vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet view visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode year





