//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;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)