I want to show record list in Datacombo through coding , using SQL Server 2000,VB6.
Following are the coding.
********************************
Private Sub Form_Load()
Dim CNN As New ADODB.Connection
Dim RST As New ADODB.Recordset
Set CNN = New ADODB.Connection
CNN.Provider = "SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Maintenance;Data Source=YASIR"
CNN.Open
Set RST = New ADODB.Recordset
RST.Open "SELECT * FROM MAINT", CNN, adOpenKeyset, adLockOptimistic
Set DataCombo1.RowSource = RST
DataCombo1.ListField = Mill
Text1 = RST!Mill
End Sub
********************************
Text1(textbox) is showing record it means dataconnection is established. but no record showing in Datacombo. Please help .one thing more that if I use Ms Access Database then record is showing Datacombo,(just chaning on cnn.provider....)
Thanks
Yasir Farid