Código PHP:
Public Sub Carga_Combo(ByVal combo As ComboBox, ByVal query As String)
Dim obj_Conn As New OleDb.OleDbConnection
Dim obj_Comm As New OleDb.OleDbCommand
Dim obj_DatR As OleDb.OleDbDataReader
Dim strItem As String
Try
obj_Conn.ConnectionString = cs
obj_Conn.Open()
obj_Comm.Connection = obj_Conn
obj_Comm.CommandType = CommandType.Text
obj_Comm.CommandText = query
obj_DatR = obj_Comm.ExecuteReader
combo.Items.Clear()
Do While obj_DatR.Read
strItem = obj_DatR.Item(1).ToString.Trim
combo.Items.Add(strItem)
Loop
obj_DatR.Close()
obj_Conn.Close()
If combo.Items.Count > 0 Then combo.SelectedIndex = 0
Catch ex As Exception
MessageBox.Show(ex.Message, "De administrador")
End Try
End Sub