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

4
Contributors
6
Replies
8
Views
9 Years
Discussion Span
Last Post by Sem Shah
0
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
0

Cheers, for the help man. :)

ps: sorry for the late reply :s

0

If suppose there is no database at all?what would the poeple of IT would have done?
Is there any remedy

0

Do you think that databases are really act as the backbone for all programming languages? your comments please

0

Ok the solution u provide mighty be true.but can u tell me what should i write insted of **** in connection string?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.