+ Reply to Thread
Results 1 to 3 of 3

Search within a recordset

  1. #1
    Registered User
    Join Date
    08-20-2007
    Posts
    60

    Search within a recordset

    I have a stored procedure which pulls the cycle time data from the server and store it in a record set. I am wondering how to search for a Cycle Time based on the given step name.

    This is a sample table column format: Step Name Cycle Time

    Here is the part of the code that pulls the data and store it in a recordset.

    Please Login or Register  to view this content.
    Wondering how can I retrieve the Cycle Time for a given step name

    Thanks in advance, Anil

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    con.Open "DSN=BOOPS05;SRVR=BOOPS05;UID=ABC;password=xyz"
    cmd.ActiveConnection = con
    sql = "sel_CT_detail '" & Plant & "','" & Part & "'"
    rs.Open sql, con, 2

    This might not be the most efficient way to do this but couldn't you loop through the records and when the match is found return that record?

    Please Login or Register  to view this content.
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    Registered User
    Join Date
    08-20-2007
    Posts
    60

    Thanks a lot

    Yes, I did it that way and it's working now. Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1