Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if recordset column exists

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
I am using a transform query to create a recordset set which stores the number of a particular part number due on a particular date. The results would be in the following format:

PartNum 15-Mar-02 22-Mar-02 etc
123456 9 100
234958 100 100

However, the dates are dynamic and I need to be able to check if a column exists for a certain date. Can I do that?
At the moment, i try to ouput the amounts due for 08-Mar-02 and it tells me that "Item cannot be found in the collection corresponding to the requested name or ordinal.
". However, I need to display the column for that date. Any ideas?? Mise Le Meas,

Mighty :)
 
If columns exist.... you could just do a query on that column and if exists then

if not rs.EOF then
get it
else
dont do anything
end if

just a quicky Regards gsc1ugs
"Cant see wood for tree's...!"
 
you could always use rs.fields(i).name - that'll return the column header.

off the top of my head:
for i = 0 to rs.fields.count -1
response.write rs.fields(i).name
next

hth leo

------------
Leo Mendoza
lmendoza@garbersoft.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top