i have the following snippet of code for getting a list of SQL Servers
Dim sqlNameList As SQLDMO.NameList
Dim x As Integer
'Filling Servers Name
sqlNameList = sqlApp.ListAvailableSQLServers
For x = 1 To sqlNameList.Count
cbo_Server.Items.Add(UCase(sqlNameList.Item(x)))
Next
this all runs fine on XP but when you try and run it on Win2k i get an error becuase the combo box expects a string or ordinal, so to get round this i had to do a type conversion. but i was just wondering why i needed to do this on Win2k and not XP?
For x = 1 To sqlNameList.Count
str_Server = CType(sqlNameList.Item(x), String)
cbo_Server.Items.Add(UCase(str_Server))
Next
Cheers,
Craig