株式会社テクナレッジ

サンプルコード 3

 try
 {
   short rc;
   int i;

   listBox1.Items.Clear();
   BtLib.Ddf ddf = new BtLib.Ddf("c:\\pvsw\\demodata");
   BtLib.Record r = ddf.GetRecord("Person");
   r.Open();
   r.Index = "ID";
   BtLib.Extended ex = r.GetExtended();
   ex.SearchCond = "@First_Name > A";
   ex.MaxRecords = 100;
   ex.SkipRecords = 100;
   ex.AddField("First_Name");
   rc = r.Read(BtLib.Operation.GetFirst);
   while(rc != 9)
   {
     rc = ex.Read(BtLib.Operation.GetNextExtended);
     if( ex.ResultCount == 0)
       break;
     for(i=0; i < ex.ResultCount; i++)
     {
       listBox1.Items.Add(ex["First_Name"].ToString());
       ex.MoveNext();
     }
   }
   r.Close();
 }
 catch( System.Exception er)
 {
   System.Diagnostics.Debug.WriteLine(er.ToString());
 }