| | |
Displaying a list of Databases in a combo box
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 application arithmetic array basic beginner browser button buttons center check click code combo crystalreport cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel exists fade file-dialog filter forms ftp generatetags hardcopy html images input insert intel listview module monitor net networking number open output panel passingparameters picturebox picturebox1 picturebox2 port print printing problem regex right-to-left searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey tcp temperature text textbox timespan toolbox transparency trim txttoxmlconverter user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





