Click here to Skip to main content
15,860,859 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Stuck in the fact that the following code does not return any values, yet if I pause the program I can see data in the immediate window OK, can someone point out what I have done wrong?.
(Total experience with Silverlight < 2 hours)


Code as follows:
C#
//class
public class codeTable
    {
        public decimal ID { get; set; }
        public string CODE { get; set; }
    }
//# end class

Conn = AutomationFactory.CreateObject("ADODB.Connection");
            recordSet = AutomationFactory.CreateObject("ADODB.RecordSet");
            Conn.Open("DRIVER={MaxDB};SERVER=localhost;DATABASE=myDB;UID=itisme;PWD=mypass;");

List<codeTable> lstData = new List<codeTable>();

recordSet.Open("SELECT ID,JOB FROM DATA.JOB", Conn);           
            while (recordSet.EOF == false)
            {
                lstData.Add(
                        new codeTable()
                        {
                            ID = recordSet.Fields.Item("ID").Value,
                            CODE = recordSet.Fields.Item("JOB").Value
                        }
                    );
                recordSet.MoveNext();
            }
 lstData = new List<codeTable>();
 combobox1.ItemsSource = lstData;
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900