I’m using ASP to generate an XML file. The variables that I'm creating in ASP are to be used to populate the final XML output.
When the ASP page first comes in, I already have a filter on my recordset:
SELECT *
FROM avgDaysOB
WHERE TERM = 'MMColParam'
and MMColParam = Request.QueryString("TERM"
It takes the TERM from a form on a previous page where you type in which TERM you want to generate the XML file for.
So let's say I typed in the TERM DAL (Dallas, TX). My recordset on the generating page would now consist of every record in the table where the TERM = DAL. What this does, is pulls 55 records. (this is not set for every TERM, but is usually the amount returned) The 55 records have the 3 fields: TERM STATE and NUMDAYS
TERM, of course, in this recordset is always DAL. So the way the table would be setup is like this:
TERM STATE NUMDAYS
DAL AL 2.4
DAL AR 2.2
DAL AZ 2.6
.
.
.
There would be a record for every U.S. State and Most of the Canadian Provinces. What this shows is how long (avg days) it takes to get to the specified STATE from the specified TERM. For example, above, it takes an avg. of 2.4 days to get to AL (alabama) from DAL (Dallas, TX)
What I am trying to do at this point is take the numbers from the NUMDAYS column and place them into ASP variables. For example:
dim AL 'creates my ASP variable to hold the value of NUMDAYS for AL
AL = ??????? 'THIS IS WHAT I DON'T KNOW.
What it needs to equal is the value that shows for the state of AL in the NUMDAYS column from my recordset.
I was trying to use:
AL = (rsOBData.Fields.Item("TERM OB"
.Value) where (rsOBData.Fields.Item("STATE"
.Value) = "AL"
with no success. If anybody can help me out with this I would MUCH appreciate it.
Thanks!
Drew
When the ASP page first comes in, I already have a filter on my recordset:
SELECT *
FROM avgDaysOB
WHERE TERM = 'MMColParam'
and MMColParam = Request.QueryString("TERM"
It takes the TERM from a form on a previous page where you type in which TERM you want to generate the XML file for.
So let's say I typed in the TERM DAL (Dallas, TX). My recordset on the generating page would now consist of every record in the table where the TERM = DAL. What this does, is pulls 55 records. (this is not set for every TERM, but is usually the amount returned) The 55 records have the 3 fields: TERM STATE and NUMDAYS
TERM, of course, in this recordset is always DAL. So the way the table would be setup is like this:
TERM STATE NUMDAYS
DAL AL 2.4
DAL AR 2.2
DAL AZ 2.6
.
.
.
There would be a record for every U.S. State and Most of the Canadian Provinces. What this shows is how long (avg days) it takes to get to the specified STATE from the specified TERM. For example, above, it takes an avg. of 2.4 days to get to AL (alabama) from DAL (Dallas, TX)
What I am trying to do at this point is take the numbers from the NUMDAYS column and place them into ASP variables. For example:
dim AL 'creates my ASP variable to hold the value of NUMDAYS for AL
AL = ??????? 'THIS IS WHAT I DON'T KNOW.
What it needs to equal is the value that shows for the state of AL in the NUMDAYS column from my recordset.
I was trying to use:
AL = (rsOBData.Fields.Item("TERM OB"
with no success. If anybody can help me out with this I would MUCH appreciate it.
Thanks!
Drew