Hello

I'm working with VS2005 and C#, I'm using Firebird, however I think Database engine is not relevant in this case.

I want to create a lookup field and a Calculated field for my table, I search in google, but I have not find a good answer.

My code at the moment, starts like that:

public partial class FrmServer : Form
    {
        private FbConnection _connect;
        private FbCommand command1;
        private FbDataAdapter DA_Item;
        private DataSet DS_Item;
        
        
        public FrmServer()
        {
            InitializeComponent();
            _connect = new FbConnection("****");
            _connect.Open();
            command1 = _connect.CreateCommand();
            command1.CommandText = "SELECT Item,TipeItem,Name,Cost,Price,weight,Item_date,";
            command1.CommandText += "old_price,barcode FROM ITEM WHERE (barcode IS NOT NULL)";
            DA_Item = new FbDataAdapter(command1);
            DS_Item = new DataSet();
            DA_Item.Fill(DS_Item);
            DataTable TArt_Item = DS_Item.Tables[0];
         
            
        }
    }

Well. depends on the calculation - if for example you had item, cost, quantity, and wanted "totalcost" you could do so in your query.

So i guess you need to work at least what you want to look up and do with any answer, as well as what calculation you want.. and what you want to do with that, before you stand a chance of coding it - and perhaps this will help you refine your searches

This article has been dead for over six months. Start a new discussion instead.