Check to see if field exisits in Recordset

ASP/VB/Access
Can anyone help me out with a function that checks to see if
a field exists in a record set. I need to check it before I try and
output it on the page and cause an error. Similar to checking to
see if a field is null. The record set is being generated from a
crosstab query in Access.
Heres what I got so far
function FieldExists(rs, fldname)
Dim X
on error resume next
X= rs(fldname)
if err.number = 0 then
FieldExists = True
else
err.clear
FieldExists = False
end if
End Function
While ((Repeat1__numRows <> 0) AND (NOT rs_dates.EOF))
If FieldExists(rs_info,
rs_dates.Fields.Item("thedate").Value) Then
Response.Write(rs_info.Fields.Item(""&(rs_dates.Fields.Item("thedate").Value)&"").Value)
End If
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_dates.MoveNext()
Wend
Thanks

Depending on what exactly you are trying to do here you probably need to do one or more of the following:
1) Use a fully qualified record set reference of queryName.column.row:
I.E.
#rs_quthorized.county_name[2]#
2) Loop over the recordset to search all the rows.  <cfoutput query="..."> or <cfloop query="..."> constructs make this rather easy to do, but nothing is preventing you from using any looping mechinism you care to use.
3)Use the valueList(queryName.column) function to turn all the date from one column in the record set into a list.  This combined with either a listFind() or listContains() function will allow you to quickly search for a single value.

Similar Messages

  • Customer wants to see Discount Field and Quantity field in Sales order Form

    Hi Gurus,
    Highly appreciate if you provide the solution for below issue:
    My customer requirement is to see Discount field in sales order lines screen...They want to know how much percentage of discount they are giving to customer, if they want to modify for respective line they modify in that field.
    Standard functionality discount field is NOT there in SO lines for because they manual enter discount in SO form, system should calculate Discounted price.
    One more required if they enter Item code, able to see available quantity bottom of the form Sub inventory wise, Availability, resealable.
    Current standard functionality supports - Click Availability button to check the availability..Its very difficult for them to check for each and every line item, is there any functionality to support this issue.
    Thanks
    Satti

    Hi,
    Both of your requirements should be customised.
    There is no standard functionality which attains your requirements.
    For my present project, we have customised 2 seperate reports, one which shows the availability of the items in subinventory and locator.
    Also a report which shows discount for all the lines and for the entire order.
    Thanks
    -Arif.

  • Cannot see form fields on EBay and Ad trader sites

    cannot see form fields on EBay and Ad trader sites. when asked to fill a form with item details the boxes that you have to fill in are missing. using Firefox 3.6.2. i have contacted Ad trader with the question but have got no replies.
    i have to use Internet Explorer to see them. does anyone have the solution to my problem? i hate explorer so much and Firefox is so quick i use it as my main browser.
    == URL of affected sites ==
    http://http://www.adtrader.co.uk/

    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"<br />
    "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"<br />
    <br />
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).<br />
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]<br />
    <br />

  • What are the Manual check Deposit Tables and  Fields(FF68)

    Hi Gurus,
    I have reqirement to get get Details about  SlipNO,Cheque NO,Cheque Date,Posting Date,
    Party code,Bank key,Currency ,Amount,Bank Account,Value Date,Entry Date,Banker's name.
    could u help me
    Thanks in Advance
    Sivakumar.

    Hi,
    Yes it doesn't.  Where do you store this information when you are posting in FF68, can you tell me the field names or where exactly do you see these fields.
    For check deposit, you can design your own layout and field text in the layout will not be exactly what you will see in the table.  I think that must be the case in your scenario. 
    Suggest look at the layout configuration from Transaction code OT45, open the variant you use (you can find that from the FF68 screen, menu option Settings --> specifications).
    Also, pick one already posted check deposit in FF68 and look for the values you are interested in for that statement in tables FEBKO and FEBEP.
    There are other tables in Banking but I do not think they would be of much use like FEBCL, FEBRE and FEBVW.  FEBVW will give you the bank name where you are depositing the slip.
    Cheers.

  • Table Maintaince ..issue to see all fields at once ??

    Dear All,
    I am working on a table maintaince. The problem I am facing is that, I have about 10 fields, I am unable to see all of them. I have to scroll left and right to see all fields.
    Is there any setting to see all at once.
    Thank you.
    Regards
    Madhu.
    Edited by: Alvaro Tejada Galindo on Mar 27, 2008 1:04 PM

    When you save a table a report is created behind it.
    Plz goto SE80 give your table name and find that system created report name.
    Now goto SE51 ->give the program name and go the layout.
    Here you can change the table size , save activate.
    Now is the time to check in SM30 for table maintanace. You might see a different size.
    I hope it helps.
    thanks,

  • RE: checking to see if date is NULL

    Hi
    I have a date field that i'm retrieving and what to check to see if it's null
    This is my piece of code:
    Date sEmpPlanStartDate = (Date)dsEmpPlan.getRowSet().getCurrentRow().getAttribute("StartDate");
    if(sEmpPlanStartDate == null)
    {...do something
    Everytime it hits the if statement, it bombs out and throws and error and all i get is an application error..
    Any help would be very appreciative
    Thanks
    Michelle

    Hi
    I have a date field that i'm retrieving and what to check to see if it's null
    This is my piece of code:
    Date sEmpPlanStartDate = (Date)dsEmpPlan.getRowSet().getCurrentRow().getAttribute("StartDate");Is this statement throwing a NPE? getCurrentRow() will return null if no row is current in the iterator.
    You may want to post the exception stack for more clues?

  • Multiple Key fields to same recordset strucure

    HI ,
    I am having a requiremet whre I need to pass multiple keyfield values to the same recordset structure.
    Sample File
    A,123,234,567
    B,234,456,645
    B,345,123,345
    C,234,565,456
    Here I need to pass A keyfield to Recordset 1 , B and C  to the recordset2 .
    Please guide how to achive this requirement to pass multiple keyfield values to the same recordet strutcure that is B and C key fields to assagin Recordset 2.
    Regards
    Krishna

    Hi Krishna - I don't think you can define an OR condition for a key field.
    So read them as separate recordsets and handle it during the mapping. I don't see any issue that way.

  • Multiscreen HTML 5  output  in Chrome – when scrolling down very long topics in the content pane the navigation area 'moves up' , i.e cant see search field or TOC.

    Hi,
    Multiscreen HTML 5  output  in Chrome – when scrolling down very long topics in the content pane the navigation area 'moves up' , i.e cant see search field or TOC.
    thanks
    Anat 

    This is by design. If you want to change this, the content section must have a set height and scroll. Which layout are you using? -- Check out the Responsive layouts and the Social layout. I believe those have the more traditional TOC placement.
    Kind regards,
    Willam

  • Checking to see what button the user pressed.

    Hello to All,
    I have a web page I am trying to create Its a form that
    allows users to enter in career information . The problem is that I
    have 1 row shown to the user at a time and when the user presses
    the (Add new) button, I want another row to appear to let the user
    enter more career information. I have figured out a way to do this
    using <cfif IsDefined("FORM.Add")> , But I don't want to send
    the form to the server, I just want to check the button and then
    add a new line without a form.submit, because right now I have 2
    forms on the page. Is there anyway to check the button pressed
    without a form submit. Like is there a coldfusion check to see what
    button has been pressed.
    sample code:
    Thank you.

    Hi,
    You can add additional rows already on the server in CF, but
    hide them with CSS, and have the add button just switch them to
    visible (with a little java script), like in the sample below.
    cheers,
    fober
    <cfset number_of_fields= 15>
    <cfoutput>
    <cfloop index="x" from="1" to="#number_of_fields#">
    <cfif x IS 1>
    <cfset style= "display:block;">
    <cfelse>
    <cfset style= "display:none;">
    </cfif>
    <div id="field#x#" style="#style#">
    <input type="File" name="field#x#"><br>
    </div>
    </cfloop>
    </cfoutput>
    <input type="Button" id="btn_add"
    onclick="visible_add('field')" value="Add File">
    <script language="JavaScript">
    function visible_add(id){
    var counter= 1;
    do{
    obj= document.getElementById(id + counter);
    if ( obj.style.display == 'none') {
    obj.style.display= 'inline';
    return;
    counter++;
    }while ( document.getElementById(id + counter) != null )
    document.getElementById('btn_add').style.display = 'none';
    </script>

  • An alert message pops up upon opening saying could not initiate application security component, and it says to check to see if profile has no read/write restrictions.

    An alert message pops up upon opening saying could not initiate application security component, and it says to check to see if profile has no read/write restrictions. Than when it opens all of my saved passwords are gone, I use a master password and its disabled. When I try to enter in a new on e it says can't change password. I can't even open yahoo e-mail says that my ssl security is down but when I check it its clicked. I'm just very confused as to whats going on.
    == This happened ==
    Every time Firefox opened
    == 5/14/2010 ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5

    See [[Could not initialize the browser security component]]
    Rename (or delete) secmod.db (secmod.db.old) in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case there is a problem with the file.

  • I am using Outlook 2010 and have a iphone 4s.  In Outlook I have issues with my contacts not being the same as what I have corrected them to be.  Is there a way to check and see which file Outlook is sharing with I-cloud?

    I am using Outlook 2010 and I also use a Iphone 4s. I use Outlook to correct all my contacts and them it sync with my phone BUT I get different variations of the contacts.  Almost as if there is another file it is going to.  Can I check to see which file it is reading from??

    This may be helpful.
    http://itconflict.com/2012/01/08/troubleshooting-icloud-sync-with-outlook/

  • Unable to open document. Please check to see if you have read permission for the above file.

    System:
    Adobe Acrobat X Pro, 10.1.2
    Windows 7 Enterprise, 32-bit
    Quad Core badass CPU
    4GB RAM
    MS Word 2010 (Office 2010)
    I installed the latest version as Administrator and am running as Administrator. I have all rights to all files on the PC.
    When I attempt to create a PDF from any Word document, whether .DOC or .DOCX, I get an error window every time:
    "Unable to open document:"
    "[document location]"
    "Please check to see if you have read permission for the above file."
    This happens after the little notice pops up "Starting the application which created the document...."
    If I open Word and create PDF from the ribbon, it works. It still won't allow me to create from Acrobat.
    It creates PDFs from Excel files but not DOC files. I've searched for solutions but found none. I did find this from July of 2011:
    "I have found out from Adobe technical support that this is a known issue with Office 2010 SP1 installed. This is an FYI for anyone else experiencing this issue, remove SP1 and it will work ok. They said an update to correct this issue will be coming within the next quarter."
    I have updated to the latest version 10.1.2 and still have this problem.
    This is a major issue, because it also fails on batch conversions, which is what I really need for the 100 or so documents that need to be PDFed. I'm not going to open each individual file and save each one from within Word.
    This is a KNOWN ISSUE at Adobe, and if you look through the forums you'll find many people having this problem, and so far, I have not seen any solution.
    If anyone has found the solution, please post it here.
    Thanks!
    B

    I think I found a solution. It seems to be relatet to normal.dotm.
    In our environment we have upgraded from XP & Office 2003 to Win7 and Office 2010. Normal.dot is stored on the users home share. When Office 2010 is started for the first time (for a user) it takes some of the old stuff from normal.dot and puts it in the new normal.dotm. When this happens, we get this error in Acrobat X.
    The solution is to rename both normal.dot and notmal.dot to e.g. normal.dot.old and normal.dotm.old. Office/Word 2010 will then create a new, "clean" normal.dotm.
    (By the way, if you are in a corporate environment, you might have changed the default path to normal.dot in Office group policies. You can see it here: HKEY_CURRENT_USER\Software\Policies\Microsoft\office\14.0\common\general\usertemplates)
    I would be interested in knowing exactly why/what in normal.dotm caused this error. I can provide you (Adobe) with a faulty normal.dot(m), if you're interested.

  • I have the iPhone 4. and when I updated the software to iOS6 My notifications don't make a sound anymore, the only sound that I get are text messages, or Email. I checked to see if the other apps were muted and they weren't. How do I fix this??

    I have the iPhone 4. and when I updated the software to iOS6 My notifications don't make a sound anymore, the only sound that I get are text messages, or Email. I checked to see if the other apps were muted and they weren't. How do I fix this

    You cannot update iPhone 4 to IOS 8.1.2, the highest you can update is IOS 7.1.2.
    Unless you've iPhone 4S (looks similar to iPhone 4)

  • I have an iMac running OS 10.4.11. How can I check to see if I have the Flashback Trojan (and remove it, if I have it)? IMy Safari is also crashing frequently. Any suggestions?

    I have an iMac running OS 10.4.11. How can I check to see if I have the Flashback Trojan (and remove it, if I have it)? IMy Safari is also crashing frequently. Any suggestions?

    Hi Barry, is this an Intel iMac, or a PPC iMac?
    Disable Java in your Browser settings, not JavaScript.
    http://support.apple.com/kb/HT5241?viewlocale=en_US
    http://support.google.com/chrome/bin/answer.py?hl=en-GB&answer=142064
    http://support.mozilla.org/en-US/kb/How%20to%20turn%20off%20Java%20applets
    Flashback - Detect and remove the uprising Mac OS X Trojan...
    http://www.mac-and-i.net/2012/04/flashback-detect-and-remove-uprising.html
    In order to avoid detection, the installer will first look for the presence of some antivirus tools and other utilities that might be present on a power user's system, which according to F-Secure include the following:
    /Library/Little Snitch
    /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
    /Applications/VirusBarrier X6.app
    /Applications/iAntiVirus/iAntiVirus.app
    /Applications/avast!.app
    /Applications/ClamXav.app
    /Applications/HTTPScoop.app
    /Applications/Packet Peeper.app
    If these tools are found, then the malware deletes itself in an attempt to prevent detection by those who have the means and capability to do so. Many malware programs use this behavior, as was seen in others such as the Tsunami malware bot.
    http://reviews.cnet.com/8301-13727_7-57410096-263/how-to-remove-the-flashback-ma lware-from-os-x/
    http://x704.net/bbs/viewtopic.php?f=8&t=5844&p=70660#p70660
    The most current flashback removal instructions are F-Secure's Trojan-Downloader:OSX/Flashback.K.
    https://www.securelist.com/en/blog/208193454/Flashfake_Removal_Tool_and_online_c hecking_site
    More bad news...
    https://www.securelist.com/en/blog/208193467/SabPub_Mac_OS_X_Backdoor_Java_Explo its_Targeted_Attacks_and_Possible_APT_link
    Removal for 10.5...
    http://support.apple.com/kb/DL1534

  • Is it normal to have to continually check to see if I am connected to the internet?

    I use a MacBook Pro with system 10.7.5 and I just purchased my Airport Extreme after my Airport Express died after about 4 years of use.  Yes, I do get more speed when I am on the internet, or at least it feels that I do, but I would happily trade that for a constant connection, like I had with my old Airport Express Base Station.  Is it normal to have to keep checking to see if I am really connected to the internet, like the bars on my main menu show?  My connection continually drops out, I can tell when I click on a link and I get no response. When I look at the main menu I see I am connected, when I Open Network Preferences, I see that the connection is still showing, but then I click on Assist Me... and choose Diagnostics, THAT'S where I am finally given an honest evaluation of my connect, which have the first 3 items lit up in green, but the next 3 items are yellow - ISP, INTERNET and SERVER.  THey are somehow usually easily fixed once I check the diagnostics, but still, is it reasonable to need to do this all throughout the day?  This is SO annoying, although I do hit nice stretches with a great connection.  How I deal with this issue gets me by, and I am grateful for that, but I don't really consider this an upgrade by trading annoyance for speed.  I rarely spent time resetting my older, earlier version of Airport.  I sure do miss that older, earlier base. 
    Does anyone know whether this is an issue that Apple is going to fix?  I ask because I have noticed that it's not only me that is going through this.

    Wireless is a big bag of voodoo with gremlin chunks on the side.
    The latest AC version Extreme is subject to quite a few issues and it is important to figure out where that problem is.
    Let me suggest some basic tests.
    1. When internet drops out, open the airport utility and find what it shows.. Is the Extreme link to the router not working?? This is a fairly common one we are finding with certain modems.. so you need to tell us exactly what modem you have and if it is working in native mode.. so a cable modem gateway working as router.. the AE should be bridged.. and you can test what is going on by connecting directly to the ISP supplied gateway by ethernet.
    Post a few screenshot of the airport utility to show us what is going on.
    2. If wireless is where the problem is.. reset the AE to factory and redo its setup.
    When you do the setup do NOT use apple recommended names.. stick to really short names, no spaces and pure alphanumerics.
    eg AEgen6 as base station name.. and let me suggest you name both bands.. AE24ghz and AE5ghz  You can fix this later back to a common name but it helps to be able to force the connection to one band or the other.
    3. Fix wireless channels as well.. just jump into the wireless options and change from auto to say channel 11 or 8 for 2.4ghz.. and you can also try a low channel, 36-48.. any of those..
    4. If you still get dropouts.. open a terminal and ping the IP address of the AE (discover that from the airport utility).. ping the main modem if it is working as the main router.. ping your ISP or DNS server.. ping google DNS, ie 8.8.8.8 or 8.8.4.4
    Then test and see if you get any improvement..Can you post the results..
    I still suspect however you are using a cable pure modem which the AE doesn't like.. eg SB6121 or SB6141 are the classic problematics.
    So give the full network setup.. modem is particularly vital.
    A few screenshots of the AE setup from the airport utility showing the summary page.. and then click edit and show us internet and network tab will help no end.

Maybe you are looking for