954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to create a Calculated and a Lookup Field

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];
         
            
        }
    }
Dav1d1
Newbie Poster
2 posts since Jan 2009
Reputation Points: 10
Solved Threads: 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

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You