How many fields in this table?

Results 1 to 2 of 2

Thread: How many fields in this table?

  1. #1
    Join Date
    Dec 1969

    Default How many fields in this table?

    I want to put the availability of the products which we have for rent in a database. The availability differs from day by day, and can have three states, Available, Unavailable of Unknown.<BR><BR>I want to show the availability for each type of product, for about 15 months in advance. <BR><BR>That&#039s about 475 days, should I make a table with 475 columns for each record, or is there a better way to do this?? It looks very heavy to me.<BR><BR>I can work with SQL or with MS Access.<BR><BR>Anybody??

  2. #2
    David Highlander Guest

    Default RE: How many fields in this table?

    I don&#039t know your code and on this machine I do not have a code segment to show you but this is what you can do.<BR><BR>Write a LOOP AS INTEGER for the Value "AVALIBLE" IN the field where you hold the values Avalible, Unavailibe or Unknown.<BR><BR>Start a variable count = 0 <BR><BR>Each time it loops increase "count" by 1<BR><BR>when the loop is complete you will have your number.<BR><BR>This code I am about to show you will not work but it will help you get a better idea.<BR><BR>&#060;%<BR>Dim count<BR>count = 0<BR>%&#062;<BR><BR>&#060;%<BR>CONNECTION STRING<BR>SELECT where TABLEFIELD = "Aavailible"<BR>RECRODSET STRING<BR>WHILE NOT RECORDSET.EOF<BR>%&#062;<BR><BR>&#060;%<BR>count = count + 1<BR>%&#062;<BR><BR>&#060;%<BR>WEND<BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts