How to create a Calculated and a Lookup Field

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 2
Reputation: Dav1d1 is an unknown quantity at this point 
Solved Threads: 0
Dav1d1 Dav1d1 is offline Offline
Newbie Poster

How to create a Calculated and a Lookup Field

 
0
  #1
Jan 22nd, 2009
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:

  1. public partial class FrmServer : Form
  2. {
  3. private FbConnection _connect;
  4. private FbCommand command1;
  5. private FbDataAdapter DA_Item;
  6. private DataSet DS_Item;
  7.  
  8.  
  9. public FrmServer()
  10. {
  11. InitializeComponent();
  12. _connect = new FbConnection("****");
  13. _connect.Open();
  14. command1 = _connect.CreateCommand();
  15. command1.CommandText = "SELECT Item,TipeItem,Name,Cost,Price,weight,Item_date,";
  16. command1.CommandText += "old_price,barcode FROM ITEM WHERE (barcode IS NOT NULL)";
  17. DA_Item = new FbDataAdapter(command1);
  18. DS_Item = new DataSet();
  19. DA_Item.Fill(DS_Item);
  20. DataTable TArt_Item = DS_Item.Tables[0];
  21.  
  22.  
  23. }
  24. }
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: How to create a Calculated and a Lookup Field

 
0
  #2
Jan 22nd, 2009
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
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC