Windows XP and Combobox problems

  • Thread starter Thread starter Mike Fellows
  • Start date Start date
M

Mike Fellows

were currently having a rollout of windows xp pro on all our machines

everything has seemed to be fine except that in our vb.net application none
of the comboboxes are getting there lists populated as they did in win2k, i
need the code to be able to work fine in both winXP and win2K

the code im using is:

Dim strConnect As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=\\Equity2\Common Documents\Master Database\OwnAndSave.mdb;" & _
"Persist Security Info=False"

Dim ocon As OleDbConnection = New OleDbConnection(strConnect)
ocon.Open()

'Declare a DataSet Object in Preparation for the DataAdapter ResultSet
Dim ds As DataSet = New DataSet()
'Declare and Create Data Adapter
Dim da As OleDbDataAdapter = New OleDbDataAdapter()


da.SelectCommand = New OleDbCommand("SELECT Employee.Full_Name, Employee.CSR
FROM(Employee)WHERE (((Employee.CSR)=1));", ocon)

da.Fill(ds)
ComboBox5.DataSource = ds.Tables(0)
ComboBox5.DisplayMember = "Full_Name"

da.Dispose()
ds.Dispose()
ocon.Close()
ocon.Dispose()
 
OK Mike a few questions.

Check in debugger, do the tables get filled with the data or are you getting
an exception thrown, and if so where ? .

let me know

OHM
 
Ok, but you can put some debug code in to find out cant you.

at least do a messagebox.show( table stuff )

to check your data is there
 
Back
Top