Recordset limits

Is there a limit to the amount of recordsets that you can
have on one page?

150 recordsets? You are out of your mind.
If what you posted is the complete page source, then there
are some real
issues here.
1. You SELECT *, but only display one column.
2. You only display the first record, ignoring all others
that may be
returned, and hold the entire set open until the end of the
page.
3. All but one of your table columns is guaranteed to be
blank, yet you
still take the time to add a div to center the non-existent
cell contents.
4. I can't imagine any sane database design that ends up with
a table named
"8th Jan 2007"
Please tell me this is just selected snippets from your
actual page...
What are you trying to do? Maybe it would be easier if we
just helped you
do it some other way. Especially if you're using gimpy
Access, which would
definitely balk at the number of connections you'd be holding
open to get
150 recordsets.
"l00pyl00" <[email protected]> wrote in
message
news:[email protected]...
>I have pages with 150 on, but they dont seem to work.
However pages with a
> couple on do. Heres my code any help would be very much
appreciated:
>
> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <!--#include file="Connections/bum.asp" -->
> <%
> Dim bc3mon1
> Dim bc3mon1_numRows
>
> Set bc3mon1 = Server.CreateObject("ADODB.Recordset")
> bc3mon1.ActiveConnection = MM_bum_STRING
> bc3mon1.Source = "SELECT * FROM [8th Jan 07] WHERE Room
='BC3' AND
> Day='Monday' AND Session='1'"
> bc3mon1.CursorType = 0
> bc3mon1.CursorLocation = 2
> bc3mon1.LockType = 1
> bc3mon1.Open()
>
> bc3mon1_numRows = 0
> %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
> <title>bum</title>
> </head>
>
> <body bgcolor="#edda8e" text="#333333" link="#000000"
vlink="#000000"
> alink="#000000">
>
> <table width="88%" border="1" align="center">
> <tr>
> <td width="2%"> </td>
> <td width="21%"><div align="center">
Monday</div></td>
> <td width="27%"><div align="center">
Tuesday</div></td>
> <td width="18%"><div align="center">
Wednesday</div></td>
> <td width="17%"><div align="center">
Thursday</div></td>
> <td width="15%"><div align="center">
Friday</div></td>
> </tr>
> <tr>
> <td>
1</td>
> <td><div
>
align="center"><%=(bc3mon1.Fields.Item("STAFF").Value)%></div></td>
> <td><div
align="center"></div></td>
> <td><div
align="center"></div></td>
> <td><div
align="center"></div></td>
> <td><div
align="center"></div></td>
> </tr>
> </table>
> </body>
> </html>
>
> <%
> bc3mon1.Close()
> Set bc3mon1 = Nothing
> %>
>
>

Similar Messages

  • Limitation on SQL executing select statement from ADO and Oracle 8.1.7.1 OleDB Driver

    Hi,
    we are running a query with a big dunamic select statement from VB code using ADO command object. When Execute method is called system hangs and control won't return back to the application. it seems to be that there is some type limitation on Query string length. Please tell us if there is any?
    we are running Oracle 8.1.7 Server on Windows 200 Server and connecting from a W2K professional, ADO 2.6 and Oracle OLEDB 8.1.7.1 OLEDB Driver.
    Sample code:
    Dim rs As ADODB.Recordset
    Dim cmd As ADODB.Command
    Set cmd = New Command
    With cmd
    .CommandText = ' some text with more than 2500 characters
    .CommandType = adCmdText
    Set rs = .Execute
    End With
    when i debug using VB6 and when .Execute line is called system hangs or return a message method <<somemethod> of <<some class name>> failed error.
    Any help is appreciated.
    Thanks,
    Anil

    A stored procedure would only slow you down here if it was poorly written. I suspect you want to use the translate function. I'm cutting & pasting examples from the documentation-- a search at tahiti.oracle.com will give you all the info you'll need.
    Examples
    The following statement translates a license number. All letters 'ABC...Z' are translated to 'X' and all digits '012 . . . 9' are translated to '9':
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    '9999999999XXXXXXXXXXXXXXXXXXXXXXXXXX') "License"
    FROM DUAL;
    License
    9XXX999
    The following statement returns a license number with the characters removed and the digits remaining:
    SELECT TRANSLATE('2KRW229',
    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')
    "Translate example"
    FROM DUAL;
    Translate example
    2229
    Also, LIKE '%<string>%' is going to be rather expensive simply because it has to compare the entire string and because it forces full table scans, rather than using indexes. You could speed this sort of query up by using interMedia Text (Oracle Text now in 9i). If you can eliminate one of the '%' options, you could also improve things.
    My guess is that your stored procedure is inefficient and that's causing the problem-- 5k rows per table should be pretty trivial.
    If you post your query over on the PL/SQL forum, there are better performance tuners than I that might have more hints for you. To get really good advice, though, you'lllikely have to get at least the execution plan for this statement and may need to do some profiling to identify the problem areas.
    Justin

  • How do I make an updateable Recordset in CS4

    Hello,
    I've been searching for a couple hours now and have been unable to find an answer to this question. I was using MX 2004 until recently (yes I know very old) but I was pretty set in my ways
    This is currently my enemy "Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."
    I could correct this in previous versions by changing the locktype or cursorlocation but these don't seem to be available to change in a Command Object?
    Am I doomed to writing out all my recordsets from now on? I am sure the command object makes a more secure recordset but that doesn't help me if I can't write a simple update statement.
    If there is a way for me to make this updateable that would be great, if not please reply with that so I can atleast stop looking and just write the recordset (probably something I should have done after looking for 5 minutes with no answers lol)
    here is my code
    Set rsThisMember_cmd = Server.CreateObject ("ADODB.Command")
    rsThisMember_cmd.ActiveConnection = MM_Conn_UBF_STRING
    rsThisMember_cmd.CommandText = "SELECT * FROM dbo.tblCMS834_Temp WHERE Id = ?"
    rsThisMember_cmd.Prepared = true
    rsThisMember_cmd.Parameters.Append rsThisMember_cmd.CreateParameter("param1", 5, 1, -1, rsThisMember__MMColParam) ' adDouble
    Set rsThisMember = rsThisMember_cmd.Execute
    My update is conditional based on whether the user hits approve or reject and only changes two fields which is why I want to write my own update code rather than use the dreamweaver update server behavior.
    <% IF Request.ServerVariables("REQUEST_METHOD") = "POST" Then
    If Request.Form("Submit") = "Reject" Then
    rsThisMember.MoveFirst
    rsThisMember("Approved") = "No"
    rsThisMember("TimeStamp") = Date()
    rsThisMember.Update
    End If
    If Request.Form("Submit") = "Approve" Then
    rsThisMember.MoveFirst
    rsThisMember("Approved") = "Yes"
    rsThisMember("TimeStamp") = Date()
    rsThisMember.Update
    End If
    End If
    %>
    I probably put in too much information but I figured it was better if people knew what I was trying to do. Should be simple. I am fne with writing my own recordset but this is something I do A LOT so it would be great if I knew if there was a way to change the Command Object rather than use Recordset.Open.
    Thanks so much,
    Lori

    This question would be much better suited for posting on the Dreamweaver AppDev forum -
    http://forums.adobe.com/community/dreamweaver/dreamweaver_development
    Can you please repost it there?

  • How to change the display limits of a dynamic table?

    Hi folks,
    I'm using DW CS4 and PHP. I've got a php page with a dynamic table and repeating region that I built for my client. This table lists our entire active member list. Initially I built the dynamic table to show only 50 records at a time because 300+ records made an overly long page. Now my client wants all the records on a single page, because he doesn't like clicking through the recordset paging of First - Next - Previous - Last list to find who he is looking for. I tried changing the Repeating Region behavior to All Records (rather than 50) but it still displays only 50. I'm sure this is because initially when I set up the dynamic table, I limited it to 50 there. Is there an easy way to change the dynamic table from 50 to All Records, without rebuilding the entire page? I've looked in several places and can't find a way to edit this. Thanks for your help,
    Gail

    Gunter,
    Thanks for your continued help on this forum. You have made people's
    work a lot easier and stuck with them through some thorny issues.
    If I may redirect you to an issue I had a few months back - the initial
    posting was here at:
    http://forums.adobe.com/thread/767154?tstart=300
    I couldn't turn the answers I received into a workable solution. Would
    you be willing to take a look at this?
    Thanks again for your help,
    Gail

  • Help with Test Server & Binding Recordset ASP-SQL

    Using CS 3.3/DW. Behavior is the same on two different
    machines. One is Vista Home Premium SP1 IIS 7 with 6 compatability,
    other is XP SP 3 IIS 5.1, both have IE 7 and full SQL 2005 with
    SP's.
    Haven't gotten very far away from static page yet, because I
    can't test. Have scoured forums and even talked to Adobe who
    recreated the problem then told me that they hadn't done sufficient
    testing to SQL 2005 prior to release, were supposed to call me
    back, did once, supposed to call back again and haven't (3 days).
    So I'm turning to the community for help, please.
    Set up test server in folder 'TServer' under
    C:\inetpub\wwwroot. Built a 'Hello World' ASP/VB Script page with
    no data attached, tests fine, puts in the appropriate folder and
    says "Hello World" in browser like a good little box should! Have
    built many DSN's, they tested during the building fine, I've tried
    various versions of ODBC and OLE DB, including but not limited to
    Native SQL Client, which is my preference and have been quite
    successful setting up the DSN's...they add to the ASP page/Site
    (it's greyed out unless you have an open ASP page) fine. Test at
    that point works fine. As soon as I bind a Recordset (whether I
    have dropped data on the page or not...same 'Hello World' page with
    Recordset info near the top of the code) and test, I error out.
    Any thoughts? I'm sure you'll need more info...I've tried to
    put as much as I can for starters. Thanks in advance.
    Peter

    When you say that you error out, what error are you getting?
    Ken Ford
    Adobe Community Expert - Dreamweaver/ColdFusion
    Fordwebs, LLC
    http://www.fordwebs.com
    "Peter AZ" <[email protected]> wrote in
    message news:g5qb7n$n30$[email protected]..
    > Using CS 3.3/DW. Behavior is the same on two different
    machines. One is Vista
    > Home Premium SP1 IIS 7 with 6 compatability, other is XP
    SP 3 IIS 5.1, both
    > have IE 7 and full SQL 2005 with SP's.
    >
    > Haven't gotten very far away from static page yet,
    because I can't test. Have
    > scoured forums and even talked to Adobe who recreated
    the problem then told me
    > that they hadn't done sufficient testing to SQL 2005
    prior to release, were
    > supposed to call me back, did once, supposed to call
    back again and haven't (3
    > days). So I'm turning to the community for help, please.
    >
    > Set up test server in folder 'TServer' under
    C:\inetpub\wwwroot. Built a
    > 'Hello World' ASP/VB Script page with no data attached,
    tests fine, puts in the
    > appropriate folder and says "Hello World" in browser
    like a good little box
    > should! Have built many DSN's, they tested during the
    building fine, I've tried
    > various versions of ODBC and OLE DB, including but not
    limited to Native SQL
    > Client, which is my preference and have been quite
    successful setting up the
    > DSN's...they add to the ASP page/Site (it's greyed out
    unless you have an open
    > ASP page) fine. Test at that point works fine. As soon
    as I bind a Recordset
    > (whether I have dropped data on the page or not...same
    'Hello World' page with
    > Recordset info near the top of the code) and test, I
    error out.
    >
    > Any thoughts? I'm sure you'll need more info...I've
    tried to put as much as I
    > can for starters. Thanks in advance.
    >
    > Peter
    >
    >

  • Limitations of File Content Conversion (FCC)

    Hi
    I want to know the Limitations of File Content Conversion (FCC) while defining for a particular structure.
    I was bit confused from the [SAP Help |http://help.sap.com/saphelp_nw2004s/helpdata/EN/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm]
    It says "There can be a fixed or variable number of substructures in a recordset." but from sdn i found
    [Content Conversion in File Adapter   |Content Conversion in File Adapter]
    It will support "A maximum of 3 hierarchy level will be supported in FCC"
    Is <recordset> Mandatetory in for FCC, what if we dont have <recordset> in the structure.
    Till what hierarchy level it supports
    what is the limitation of FCC
    Regards,
    Varun
    Edited by: Varun Reddy on Feb 26, 2009 4:52 PM

    Varun,
    Both statements are true:
    Consider, for instance, a file containing orders. You could have:
    HEADER;123;456;11112 (containing sender 123, receiver 456, order number 11112)
    PARTNER;OR;234 (containing the ordering partner number 234)
    PARTNER;DL;235 (containing the delivery address 235)
    DATE;OR;20090226 (containing the order date 26/02/2009)
    DATE;DL;20090228 (containing the delivery date 28/02/2009)
    LINE;9998;12 (article number 9998, quantity 12)
    LINE;9996;25 (article number 9996, quantity 25)
    LINE;9991;3 (article number 9991, quantity 3)
    HEADER;123;456;11113 (2nd order containing sender 123, receiver 456, order number 11113)
    PARTNER;OR;234 (containing the ordering partner number 234)
    PARTNER;DL;237 (containing the delivery address 237)
    DATE;OR;20090226 (containing the order date 26/02/2009)
    DATE;DL;20090301 (containing the delivery date 01/03/2009)
    LINE;9998;4 (article number 9998, quantity 4)
    Parsing such a file with FCC would be possible, provided there's an identifier that indicates the type of line (like 'HEADER', 'PARTNER', etc). This is an example of There can be a variable number of substructures in a recordset.
    If the records do not contain an identifier from which you can see the line type, FCC can only parse this if the order of the various structure types is fixed, so that it can determine from the line number what type of record this is. This would be an example of There can be a fixed number of substructures in a recordset.
    Now, about A maximum of 3 hierachy level will be supported in FCC. In the FCC, there are three levels: the recordset (one order in the above example), the record (a line in the file) and the field (the order number, for instance). The FCC does not support files with deeper nesting. For instance, if a line item in your flat file could also contain a delivery date, FCC does not support this.
    Hope this helps,
    Koen

  • Need help with a recordset

    I need some help with a recordset that selects a series of
    vehicle makes that then show models when a make is selected. The
    problem is when I select the make it shows a list of models like it
    should, some of the make lists have five models and some have ten
    or more. What I need help with is how to limit the list to just the
    models and not include the "null" values. This makes my drop down
    list have large empty spaces at the end of the options listed. The
    query is as follows:
    SELECT *
    FROM saa.vehicle_make
    WHERE make = '#FORM.select_make#'
    Question # 2:
    What can I add to this recordset so that I can search on just
    the make alone without the model included. The submit includes both
    of the make and model lists so that makes it tough to break up.
    Here is the recordset:
    SELECT make
    FROM saa.vehicle_make
    ORDER BY make ASC
    Thanks
    Shane

    Sorry I guess I wasn't being clear. The lists work fine with
    the present recordsets but I was trying to clean them up just a
    little. I am using a table in mysql instead of an array for ease of
    maintenance due to the high number of makes and models I am working
    with.
    For question number one I was looking for sql that allows me
    to only show the models in the table for each make no matter how
    many are in the row. Currently when I use the existing recordset I
    get a long list of blank spaces as it is returning the "null"
    fields also. I would like it to just show the models and stop at
    the first null field.
    For the second question I wanted to be able to submit the
    form with just the make listed if someone wanted to see all Hondas
    lets say. Not I have to select the make also so it limits the
    return.
    Thanks for all of the input
    Shane
    Here is the code I am using for the two dependent select
    boxes:
    <p align="center">Vehicle Search by
    Make/Model</p>
    <!--- store the selected make variable after the first
    select boxes submits itself --->
    <cfif isDefined('form.select_make')>
    <cfset page.select_make = form.select_make>
    </cfif>
    <cfoutput>
    <form name="DropDown" method="post">
    <!--- query DB for the first drop down list --->
    <cfquery name="get_make" datasource="saa">
    SELECT make FROM saa.vehicle_make ORDER BY make ASC
    </cfquery>
    <!--- first drop down list --->
    <!--- NOTICE the onChange javascript event in the select
    tag, this is what submits the form after the first selection
    --->
    <p align="center">Model:<select name="select_make"
    required="yes" onchange="this.form.submit()">
    <option>Select Make</option>
    <!--- dynamically populate the first drop down list based
    on the get_make query --->
    <cfloop query="get_make">
    <option value="#make#" <cfif
    isDefined('form.select_make')><cfif form.select_make eq
    "#make#">selected</cfif></cfif>>#make#</option>
    </cfloop>
    </select></p>
    <!--- if the first selection has been made, display the
    second drop down list with the appropriate results --->
    <cfif isDefined('form.select_make')>
    <!--- query DB for second drop down list, based on the
    selected item from the first list --->
    <cfquery name="get_model" datasource="saa">
    SELECT * FROM saa.vehicle_make WHERE make =
    '#FORM.select_make#'
    </cfquery>
    <!--- second drop down list --->
    </cfif>
    </form>
    </cfoutput>
    <cfoutput>
    <form action="buyerModelSearchresults.cfm"
    method="POST">
    <p align="center">Model: <select name="model"
    required="yes">
    <option>Select Model</option>
    <!--- dynamically populate the second drop down list
    based on the get_make query --->
    <cfloop query="get_model">
    <option value="#model1#">#model1#</option>
    <option value="#model2#">#model2#</option>
    <option value="#model3#">#model3#</option>
    <option value="#model4#">#model4#</option>
    <option value="#model5#">#model5#</option>
    <option value="#model6#">#model6#</option>
    <option value="#model7#">#model7#</option>
    <option value="#model8#">#model8#</option>
    <option value="#model9#">#model9#</option>
    <option value="#model10#">#model10#</option>
    <option value="#model11#">#model11#</option>
    <option value="#model12#">#model12#</option>
    <option value="#model13#">#model13#</option>
    <option value="#model14#">#model14#</option>
    <option value="#model15#">#model15#</option>
    <option value="#model16#">#model16#</option>
    <option value="#model17#">#model17#</option>
    <option value="#model18#">#model18#</option>
    <option value="#model19#">#model19#</option>
    <option value="#model20#">#model20#</option>
    <option value="#model21#">#model21#</option>
    <option value="#model22#">#model22#</option>
    <option value="#model23#">#model23#</option>
    <option value="#model24#">#model24#</option>
    <option value="#model25#">#model25#</option>
    </cfloop>
    </select>
    </p>
    <p align="center">Search by Make/Model:</p>
    <p align="center"><input type="submit" name="Submit"
    value="Submit"></p>
    </form>
    </cfoutput>

  • Problems with recordset in PHP/MySQL setting

    We use Dreamweaver CS5 for creating dynamic pages (PHP pages with MySQL database). We test the site locally on a Windows 7 operating system with EasyPHP as WAMP server.
    We often have a problem in managing the record set.
    The following problem occurs quite often:
    We take a PHP page. We create a recordset. We use a dynamic table or a repeated region to show the results of the recordset. So far so good.
    Then we want to change something to the recordset for example the filter. When editing the recordset, the advanced mode is shown, it is impossible to swith to the simple mode.
    By deleting the recordset the problem is not solved. By deleting and afterwards rebuilding the recordset, syntax errors occur. It seems that the php code for building the recordset didn't dissapear.
    The only solutions till now seems to completely restart with a new PHP page.
    Anyone has a solution for this or anyone did experience the same problem ?
    Thank you very much in advance.
    Ilse 

    You cannot switch to Simple mode in the Recordset dialog box if you have made any changes to the SQL in Advanced mode.
    Opening the Recordset dialog box to edit the settings does occasionally result in the code being inserted again instead of being changed. This appears to be an intermittent bug, which I have experienced myself, and know that others have complained about it, too. As far as I know, there is no solution other than to watch carefully the code that Dreamweaver generates.
    If you don't understand the code, you would be well advised to learn what it means and does. Relying on Dreamweaver to do everything for you severely limits what you can do with PHP/MySQL. Adobe regards the server behaviors as quick prototyping tools, rather than for developing production websites.

  • Forum - php/mysql - recordset

    Current Recordset:
    SELECT id, threadid, postersname, topic, message, dateposted,
    threadstarter, mypicurl FROM forum WHERE threadstarter = '1' ORDER
    BY id DESC
    repeat region displays results. Since the where clause limits
    to only those that started threads, there are no duplicate topics.
    Now I want to add two things to the results:
    1. display the number of replies to the topic (i.e. all the
    records that match the same threadid as the above recordset in the
    repeat region, but where threadstarter = '0' )
    I would also like to display the last person to enter a reply
    (i.e. threadid matches the threadid of the recordset repeat region
    and is the last entry in database).
    How can I do this. I want to minimize my calls / recordsets
    to accomplish this.

    jsteinmann wrote:
    > Current Recordset:
    > SELECT id, threadid, postersname, topic, message,
    dateposted, threadstarter,
    > mypicurl FROM forum WHERE threadstarter = '1' ORDER BY
    id DESC
    >
    > repeat region displays results. Since the where clause
    limits to only those
    > that started threads, there are no duplicate topics.
    >
    > Now I want to add two things to the results:
    >
    > 1. display the number of replies to the topic (i.e. all
    the records that match
    > the same threadid as the above recordset in the repeat
    region, but where
    > threadstarter = '0' )
    >
    > I would also like to display the last person to enter a
    reply (i.e. threadid
    > matches the threadid of the recordset repeat region and
    is the last entry in
    > database).
    >
    > How can I do this. I want to minimize my calls /
    recordsets to accomplish
    > this.
    You want a sub-query in your SQL, you basically put another
    select
    statement in brackets followed by AS ColumnName where
    ColumnName is the
    new name of that column. Make sense? If not I will try to
    explain a
    little more.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html
    How To Report A Bug To Adobe
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Compare contrast 2 recordsets?

    Ok, I have one procedure that has two record set in it. The way that it looks is sort of like this.
    create or replace
    PROCEDURE PROC2RECS AS
    BEGIN   
    FOR rec IN (  SELECT some, information, FROM DB1 dblink to another db.
       LOOP    
            IF (condition etc...)       
            ELSIF (condition etc...)          
                 -- UPDATE something
                 -- SET something = someother thing;         
            ELSIF (condition etc...)
            END IF;      
       END LOOP;  
    FOR rec2 IN (  SELECT some, information, FROM LocalDB
       LOOP    
            IF (condition etc...)       
            ELSIF (condition etc...)          
                 -- UPDATE something
                 -- SET something = someother thing;         
            ELSIF (condition etc...)
            END IF;      
       END LOOP;     
    END PROC2RECS;Now these recordsets are coming from two different Oracle 8i databases is there a way to combine thes recordsets to get data from them?
    In other words. Like do a
    IF rec.id <>  rec2.id THEN
          output something;
    END IF

    You're limited in your options by still being on 8i. I'm not sure CAST() conversions against database types will work there, and the 10g set operations (which I've only gotten to work on simple one-element collections besides) won't work either.
    One option is to load the data into tables (do global temporary tables exist in 8i?) and perform set operations on them.

  • DW8 Recordset behavior returns empty TEXT type values

    So I have DW8 generating a recordset (ASP/VBScript from SQL
    Server) using
    just the basic behavior. If I don't set any criteria and it
    retrieves all
    records, it shows all data for each record, including the
    values contained
    within the "Text" type field.
    If I specify a unique identifier value (to retrieve only one
    specific
    record), the DW recordset shows all details EXCEPT the text
    found in the
    "text" type field. Doing a TEST of the recordset this way
    shows "undefined"
    in that field, and of course, on the page, its blank. I could
    workaround
    this by using a "varchar" type or some other, but I'm then
    more limited on
    amount of text alotted.
    Anyone run into this before and have an idea on what I need
    to do so that
    the text blob is pulled into the unique recordset like it
    does for all of
    the other field types?

    Don't use SELECT *.
    List the columns you're retrieving. Put all TEXT, NTEXT, and
    IMAGE columns
    at the end of your select list. If you have more than one,
    list them from
    left to right in the same order in which they're defined in
    your table.
    If you're using SQL Server 2005, use VARCHAR(MAX) instead of
    TEXT.
    "_adrian" <test@ test.com> wrote in message
    news:ekinf4$71$[email protected]..
    > So I have DW8 generating a recordset (ASP/VBScript from
    SQL Server) using
    > just the basic behavior. If I don't set any criteria and
    it retrieves all
    > records, it shows all data for each record, including
    the values contained
    > within the "Text" type field.
    >
    > If I specify a unique identifier value (to retrieve only
    one specific
    > record), the DW recordset shows all details EXCEPT the
    text found in the
    > "text" type field. Doing a TEST of the recordset this
    way shows
    > "undefined" in that field, and of course, on the page,
    its blank. I could
    > workaround this by using a "varchar" type or some other,
    but I'm then more
    > limited on amount of text alotted.
    >
    > Anyone run into this before and have an idea on what I
    need to do so that
    > the text blob is pulled into the unique recordset like
    it does for all of
    > the other field types?
    >

  • SSRS Tablix not showing full resultset. Recordset seems truncated.

    Hi,
    I have created a tablix for Test Results History as shown below. All components are added inside of a Rectangle (container). 
    Issue:
    1) This table failed to show full resultset; recordset got truncated. The query returns 316 records, table displays only 239 records, where 240th record got truncated. Please see below screenshot.
    Investigations/Analysis:
    1) I tested with another query that returns 54 records; all records are displayed. Another query that returns 585; only 215 records are displayed. It seems that the number of records is not the limiting factor; the length of the tablix, or the Rectangle
    (container) may possibly be the culprit.
    Question:
    How do I fix this? Please help!

    Hi Simon,
    I do have parameter defined but the "Display Test Result history" parameter only sets below behaviors:
    1) If False, the Rectangle (container) becomes invisible, and the query would return no result (to increase performance)
    2) If True, the Rectangle (container) becomes visible, and the query return valid results
    The behavior I'm seeing right now is that the table is visible, and results are shown. However, some results are missing.
    You may refer to below code:
    declare @SelectedTestPlans nvarchar(500) /* Testing purpose */
    -- set @SelectedTestPlans = '104' /* Testing purpose */
    set @SelectedTestPlans = '81, 79' /* Testing purpose */
    declare @ShowTestResultHistory bit /* Testing purpose */
    set @ShowTestResultHistory = 'true' /* Testing purpose */
    declare @SelectedIDs TABLE(IDs integer)
    insert into @SelectedIDs
    select * from master.dbo.fnSplitIDs(@SelectedTestPlans)
    declare @TestCaseIdsTable TABLE
    TestCaseId int
    /* Update #00-1 - Populate Only TestCaseId */
    insert @TestCaseIdsTable (TestCaseId)
    select distinct
    TestCaseId
    from ([Tfs_Warehouse].[dbo].[FactTestResult] ftr
    inner join [Tfs_Warehouse].[dbo].[DimConfiguration] dc
    on dc.ConfigurationSK = ftr.ConfigurationSK
    inner join @SelectedIDs s
    on ftr.TestPlanSK = s.IDs)
    where (@ShowTestResultHistory = 'true')
    declare @HistoryTable TABLE
    TestCaseId nchar(36),
    Test nvarchar(256),
    Result nvarchar(64),
    OutcomeId tinyint,
    ConfigurationId int,
    Configuration nvarchar(256),
    CreationDate datetime,
    Name nvarchar(4000)
    INSERT @HistoryTable (TestCaseId, Test, Result, OutcomeId, ConfigurationId, Configuration, CreationDate, Name)
    SELECT DR.[TestCaseId]
    ,[Test]
    ,[Outcome] as Result
    ,[OutcomeId]
    ,C.[ConfigurationId]
    ,C.[Name] as Configuration
    ,[CreationDate]
    ,DP.[Name] as 'Run By'
    FROM [Tfs_Warehouse].[dbo].[DimTestResult] DR
    inner join [Tfs_Warehouse].[dbo].[FactTestResult] TR on DR.ResultBK = TR.TestResultBK
    join [Tfs_Warehouse].[dbo].DimConfiguration C on TR.ConfigurationSK = C.ConfigurationSK
    join [Tfs_Warehouse].[dbo].[DimPerson] DP on DR.ExecutedBySK = DP.PersonSK,
    @TestCaseIdsTable TCID
    Where DR.[TestCaseId] = TCID.[TestCaseId]
    And (@ShowTestResultHistory = 'true')
    Select * From @HistoryTable
    Order By [TestCaseId]
    Hmm.. What am I missing here?

  • Limiting search results to show results based off of entry in a catgory.

    I am working of someones previous search query, and now the company wants it to be more limited to what is viewed.  I have multiple users in a database and each user has a state assigned to them. I do not want the user when doing a search, to have the results comeback and show all results for every state. The States are defined in the database category as follows. IL, IA, FL, NV.  There will never be anything in this category but these. Below is the code that I am trying to modify to limit the result to the specific state they are using. This is current page for searching in IA. What do I need to change so it will search all search terms, but limit the results to only show for that state.  Thanks in advance.
    <?php require_once('../Connections/forms.php'); ?>
    <?php include('inc_auth.php') ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $colname_subcat3 = "-1";
    if (isset($_GET['Category'])) {
      $colname_subcat3 = (get_magic_quotes_gpc()) ? $_GET['Category'] : addslashes($_GET['Category']);
    $colname1_subcat3 = "-1";
    if (isset($_GET['SubCat1'])) {
      $colname1_subcat3 = (get_magic_quotes_gpc()) ? $_GET['SubCat1'] : addslashes($_GET['SubCat1']);
    $colname2_subcat3 = "-1";
    if (isset($_GET['SubCat2'])) {
      $colname2_subcat3 = (get_magic_quotes_gpc()) ? $_GET['SubCat2'] : addslashes($_GET['SubCat2']);
    $colname3_subcat3 = "-1";
    if (isset($_GET['SubCat3'])) {
      $colname3_subcat3 = (get_magic_quotes_gpc()) ? $_GET['SubCat3'] : addslashes($_GET['SubCat3']);
    mysql_select_db($database_forms, $forms);
    $query_subcat3 = sprintf("SELECT * FROM `forms` WHERE Category = %s and SubCat1 = %s and SubCat2 = %s and SubCat3 = %s ORDER BY Description ASC", GetSQLValueString($colname_subcat3, "text"),GetSQLValueString($colname1_subcat3, "text"),GetSQLValueString($colname2_subcat3, "text"),GetSQLValueString($colname3_subcat3, "text"));
    $subcat3 = mysql_query($query_subcat3, $forms) or die(mysql_error());
    $row_subcat3 = mysql_fetch_assoc($subcat3);
    $totalRows_subcat3 = mysql_num_rows($subcat3);
    $colname_category = "-1";
    if (isset($_GET['Category'])) {
      $colname_category = (get_magic_quotes_gpc()) ? $_GET['Category'] : addslashes($_GET['Category']);
    mysql_select_db($database_forms, $forms);
    $query_category = sprintf("SELECT * FROM `forms` WHERE Category = %s ", GetSQLValueString($colname_category, "text"));
    $category = mysql_query($query_category, $forms) or die(mysql_error());
    $row_category = mysql_fetch_assoc($category);
    $totalRows_category = mysql_num_rows($category);
    $colname_subcat1 = "-1";
    if (isset($_GET['Category'])) {
      $colname_subcat1 = (get_magic_quotes_gpc()) ? $_GET['Category'] : addslashes($_GET['Category']);
    $colname1_subcat1 = "-1";
    if (isset($_GET['SubCat1'])) {
      $colname1_subcat1 = (get_magic_quotes_gpc()) ? $_GET['SubCat1'] : addslashes($_GET['SubCat1']);
    mysql_select_db($database_forms, $forms);
    $query_subcat1 = sprintf("SELECT * FROM `forms` WHERE Category = %s and SubCat1 = %s ORDER BY Description ASC", GetSQLValueString($colname_subcat1, "text"),GetSQLValueString($colname1_subcat1, "text"));
    $subcat1 = mysql_query($query_subcat1, $forms) or die(mysql_error());
    $row_subcat1 = mysql_fetch_assoc($subcat1);
    $totalRows_subcat1 = mysql_num_rows($subcat1);
    $colname_subcat2 = "-1";
    if (isset($_GET['Category'])) {
      $colname_subcat2 = (get_magic_quotes_gpc()) ? $_GET['Category'] : addslashes($_GET['Category']);
    $colname1_subcat2 = "-1";
    if (isset($_GET['SubCat1'])) {
      $colname1_subcat2 = (get_magic_quotes_gpc()) ? $_GET['SubCat1'] : addslashes($_GET['SubCat1']);
    $colname2_subcat2 = "-1";
    if (isset($_GET['SubCat2'])) {
      $colname2_subcat2 = (get_magic_quotes_gpc()) ? $_GET['SubCat2'] : addslashes($_GET['SubCat2']);
    mysql_select_db($database_forms, $forms);
    $query_subcat2 = sprintf("SELECT * FROM `forms` WHERE Category = %s and SubCat1 = %s and SubCat2 = %s ORDER BY Description ASC", GetSQLValueString($colname_subcat2, "text"),GetSQLValueString($colname1_subcat2, "text"),GetSQLValueString($colname2_subcat2, "text"));
    $subcat2 = mysql_query($query_subcat2, $forms) or die(mysql_error());
    $row_subcat2 = mysql_fetch_assoc($subcat2);
    $totalRows_subcat2 = mysql_num_rows($subcat2);
    $colname_subcat4 = "-1";
    if (isset($_POST['searchbox'])) {
      $colname_subcat4 = (get_magic_quotes_gpc()) ? $_POST['searchbox'] : addslashes($_POST['searchbox']);
    $colname6_subcat4 = "-1";
    if (isset($_POST['searchbox'])) {
      $colname6_subcat4 = (get_magic_quotes_gpc()) ? $_POST['searchbox'] : addslashes($_POST['searchbox']);
    $colname1_subcat4 = "-1";
    if (isset($_POST['searchbox'])) {
      $colname1_subcat4 = (get_magic_quotes_gpc()) ? $_POST['searchbox'] : addslashes($_POST['searchbox']);
    $colname2_subcat4 = "-1";
    if (isset($_POST['searchbox'])) {
      $colname2_subcat4 = (get_magic_quotes_gpc()) ? $_POST['searchbox'] : addslashes($_POST['searchbox']);
    $colname3_subcat4 = "-1";
    if (isset($_POST['searchbox'])) {
      $colname3_subcat4 = (get_magic_quotes_gpc()) ? $_POST['searchbox'] : addslashes($_POST['searchbox']);
    $colname4_subcat4 = "-1";
    if (isset($_POST['searchbox'])) {
      $colname4_subcat4 = (get_magic_quotes_gpc()) ? $_POST['searchbox'] : addslashes($_POST['searchbox']);
    $colname5_subcat4 = "-1";
    if (isset($_POST['searchbox'])) {
      $colname5_subcat4 = (get_magic_quotes_gpc()) ? $_POST['searchbox'] : addslashes($_POST['searchbox']);
    mysql_select_db($database_forms, $forms);
    $query_subcat4 = sprintf("SELECT * FROM `forms` WHERE Title LIKE CONCAT('%%', %s, '%%') or Description LIKE CONCAT('%%', %s, '%%') or Category LIKE CONCAT('%%', %s, '%%') or SubCat1 LIKE CONCAT('%%', %s, '%%') or SubCat2 LIKE CONCAT('%%', %s, '%%') or SubCat3 LIKE CONCAT('%%', %s, '%%') or Keywords LIKE CONCAT('%%', %s, '%%') ORDER BY Description ASC", GetSQLValueString($colname_subcat4, "text"),GetSQLValueString($colname1_subcat4, "text"),GetSQLValueString($colname2_subcat4, "text"),GetSQLValueString($colname3_subcat4, "text"),GetSQLValueString($colname4_subcat4, "text"),GetSQLValueString($colname5_subcat4, "text"),GetSQLValueString($colname6_subcat4, "text"));
    $subcat4 = mysql_query($query_subcat4, $forms) or die(mysql_error());
    $row_subcat4 = mysql_fetch_assoc($subcat4);
    $totalRows_subcat4 = mysql_num_rows($subcat4);
    // date format function
    function makeStamp($theString) {
      if (ereg("([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $theString, $strReg)) {
        $theStamp = mktime($strReg[4],$strReg[5],$strReg[6],$strReg[2],$strReg[3],$strReg[1]);
      } else if (ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})", $theString, $strReg)) {
        $theStamp = mktime(0,0,0,$strReg[2],$strReg[3],$strReg[1]);
      } else if (ereg("([0-9]{2}):([0-9]{2}):([0-9]{2})", $theString, $strReg)) {
        $theStamp = mktime($strReg[1],$strReg[2],$strReg[3],0,0,0);
      return $theStamp;
    function makeDateTime($theString, $theFormat) {
      $theDate=date($theFormat, makeStamp($theString));
      return $theDate;
    // end date format function
    ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <?php include('inc_titleia.php') ?>
    <link href="styles.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="banneria"></div>
    <div id="container">
        <div id="left">
    <?php include('inc_formselectoria.php') ?>
        </div> <!-- end left -->
        <div id="right">
    <?php if ($totalRows_subcat4 == 0) { // Show if recordset empty ?>
      <p class="largebold">Sorry.Not found.</p>
    <?php } // Show if recordset empty ?>
    <?php if ($totalRows_subcat4 > 0) { // Show if recordset not empty ?>
      <p class="largebold"></p>
          <?php do { ?>
    <a href="../members/uploads/<?php echo $row_subcat4['File']; ?>">        <div id="subleft">Download <br>
      <br>
    </div>
                <div id="subcenter"><?php echo $row_subcat4['Title']; ?><br>
                  <?php echo $row_subcat4['Description']; ?></div>
                <div id="subright">Updated <?php echo makeDateTime($row_subcat4['Date'], 'm/d/Y'); ?></div>        </a>    <div id="clear">        </div>
            <hr><?php } while ($row_subcat4 = mysql_fetch_assoc($subcat4)); ?>
      <?php } // Show if recordset not empty ?>
          </div><!-- end right -->
      <div id="clear">        </div>
    </div><!-- end container -->
    </body>
    </html>
    <?php
    mysql_free_result($subcat3);
    mysql_free_result($category);
    mysql_free_result($subcat1);
    mysql_free_result($subcat2);
    mysql_free_result($subcat4);
    ?>

    >The search box being used allows the users to enter any phrase and the
    >search script searches against all these tables for keywords, form numbers, names, etc
    Does the form have a single search field?
    >My problem is. Lets say I am logged in using the state IA...
    Assuming that the 'form' table has a state field, you just need to include that in the WHERE clause. You can either get that when you log in, by retrieving it from the user table, or, by joining the two tables together in the query. The latter assumes that there is a relationship between user and form.
    But again, I suggest as a first step to clean up the mess that you already have. The person that created this did not understand what they were doing.

  • ResultSet Limitation

    Microsoft's database access technology (ADO) has a feature collected disconnected recordsets. You can open the connection, execute the query and subsequently close your connection. Afterwards, you can process your recordSet(equivalent to ResultSets).
    With JDBC, it seems you cannot do something like that. The connection should be open if you want to process your resultSet.
    Is there a way to achieve what Microsoft does using JDBC?
    Kind Regards,
    greg

    The maximum number of rows that can be returned by a
    ResultSet is Integer.MAX_VALUE
    Your experiences will vary depending upon a multitude
    of factors including but not limited to: your
    database, your driver.Integer.MAX_VALUE , how it is related to database driver can you explain me pls?.
    Advances wishes :)

  • Lists, Arrays, Recordsets

    Not sure how to label this issue that I am trying to solve...
    What  I am trying to do is take a list of students from a database query  recordset and assign them the a counselor from a database query  recordset and place them in an alternating rotation Monday through  Friday for the remainder of the year.
    Example of desired result.
    student1 - June 6,   2011
    Counselor1
    student1 - June 7, 2011
    Counselor2
    student1 - June 8, 2011
    Counselor3
    student1 - June 9, 2011
    Counselor4
    student1 - June 10, 2011
    Counselor5
    student1 - June 11, 2011
    Counselor6
    student1 - June 12, 2011
    Counselor7
    student1 - June 13, 2011
    Counselor8
    student1 - June 14, 2011
    Counselor9
    student1 - June 15, 2011
    Counselor10
    student1 - June 16, 2011
    Counselor11
    student1 - June 17, 2011
    Counselor12
    student1 - June 18, 2011
    Counselor1
    student1 - June 19, 2011
    Counselor2
    student1 - June 20, 2011
    Counselor3
    student1 - June 21, 2011
    Counselor4
    student1 - June 22, 2011
    Counselor5
    student1 - June 23, 2011
    Counselor6
    student1 - June 24, 2011
    Counselor7
    student1 - June 25, 2011
    Counselor8
    student1 - June 26, 2011
    Counselor9
    student1 - June 27, 2011
    Counselor10
    student1 - June 28, 2011
    Counselor11
    student1 - June 29, 2011
    Counselor12
    student1 - June 30, 2011
    Counselor1
    student2 - June 6, 2011
    Counselor2
    student2 - June 7, 2011
    Counselor3
    student2 - June 8, 2011
    Counselor4
    student2 - June 9, 2011
    Counselor5
    student2 - June 10, 2011
    Counselor6
    student2 - June 11, 2011
    Counselor7
    student2 - June 12, 2011
    Counselor8
    student2 - June 13, 2011
    Counselor9
    student2 - June 14, 2011
    Counselor10
    student2 - June 15, 2011
    Counselor11
    student2 - June 16, 2011
    Counselor12
    student2 - June 17, 2011
    Counselor1
    student2 - June 18, 2011
    Counselor2
    student2 - June 19, 2011
    Counselor3
    student2 - June 20, 2011
    Counselor4
    student2 - June 21, 2011
    Counselor5
    student2 - June 22, 2011
    Counselor6
    student2 - June 23, 2011
    Counselor7
    student2 - June 24, 2011
    Counselor8
    student2 - June 25, 2011
    Counselor9
    student2 - June 26, 2011
    Counselor10
    student2 - June 27, 2011
    Counselor11
    student2 - June 28, 2011
    Counselor12
    student2 - June 29, 2011
    Counselor1
    student2 - June 30, 2011
    Counselor2
    student3 - June 6, 2011
    Counselor3
    student3 - June 7, 2011
    Counselor4
    student3 - June 8, 2011
    Counselor5
    student3 - June 9, 2011
    Counselor6
    student3 - June 10, 2011
    Counselor7
    student3 - June 11, 2011
    Counselor8
    student3 - June 12, 2011
    Counselor9
    student3 - June 13, 2011
    Counselor10
    student3 - June 14, 2011
    Counselor11
    student3 - June 15, 2011
    Counselor12
    student3 - June 16, 2011
    Counselor1
    student3 - June 17, 2011
    Counselor2
    student3 - June 18, 2011
    Counselor3
    student3 - June 19, 2011
    Counselor4
    student3 - June 20, 2011
    Counselor5
    student3 - June 21, 2011
    Counselor6
    student3 - June 22, 2011
    Counselor7
    student3 - June 23, 2011
    Counselor8
    student3 - June 24, 2011
    Counselor9
    student3 - June 25, 2011
    Counselor10
    student3 - June 26, 2011
    Counselor11
    student3 - June 27, 2011
    Counselor12
    student3 - June 28, 2011
    Counselor1
    student3 - June 29, 2011
    Counselor2
    student3 - June 30, 2011
    Counselor3
    I  have tried a combination of lists, nested index loops, and mutli  dimensional arrays. I have seemed to be dead locked. This is a start to  the example of what I have been trying and I am sure you can see it  isn't the desired result. It will provide only a student schedule  without an assigned counselor. The problem has been fitting the  counselor into the rotation.
    <cfset daysleft = DaysinYear(todaysDate) - DayofYear(todaysDate) >
    <cfoutput query="StudentQuery">
        <cfloop index = "LoopCount" from = "0" to = "#daysleft#">
            <cfset scheduledate = DayOfWeek(todaysdate+Loopcount)>
                <cfif DayOfWeek(scheduledate) is not 7 AND DayOfWeek(scheduledate) is not 1>
                     #StudentName# - #DayofWeekAsString(DayOfWeek(scheduledate))# -  #DateFormat((todaysdate+Loopcount), 'long')#<br>
                </cfif>
        </cfloop><br />
    </cfoutput>
    Keep  in mind there needs to be an finite number of students and counselors  determined by database records that do change. The plan is to rerun the  script weekly as these records change. The dates are finite and simply  reduce from week to week. December 31st is the last day. Any help is  appreciated.

    cfsearching... thanks for the reply! This one seemed rather involved an wasn't sure that I would get any help. I actually had been hunting in the right location, I just wasn't sure how to do it. Your answer helped me definitly feel more confident in my results. The problem actually got a little more complicated when the client told me that there needed to be limits on the counelor's schedule.. grrr. Anyhow... here is what I came up with so far. It is a frankenstein but it works pretty good.
            <!--- Get the TBCounselor records --->
        <CFQUERY DATASOURCE="databaseExample" name="Schedule">
        SELECT s.Scheduledate, s.Couselor, r.LimitationNumber, COUNT(Couselor) AS CounselorCount, r.ID
        FROM ScheduleTable s INNER JOIN CounselorTable r
            ON s.Couselor = r.ID
        WHERE Limitation > 0
        GROUP BY s.Scheduledate, s.Couselor, r.LimitationNumber, r.ID
        ORDER BY s.Couselor
        </CFQUERY>
    <!--- sets todays date --->
    <cfset todaysdate = #CreateODBCDate(NOW())#>
        <cfoutput>
            <!---Find the dates for the next week --->
            <cfloop index = "LoopCount" from = "0" to = "60">
                <cfset Scheddate = DayOfWeek(todaysdate+Loopcount)>
                <cfset SchedDateAct = todaysdate+Loopcount>
                <cfset ScheduleID = "#CreateUUID()#"> 
                    <CFQUERY DATASOURCE="databaseExample">
                        INSERT INTO ScheduleTable(ID,SchedDateAct,StudentID,StudentIndex,Counselor)
                        VALUES(<cfqueryparam value="#ScheduleID#" cfsqltype="cf_sql_varchar">,
                            <cfqueryparam value="#SchedDateAct#" cfsqltype="cf_sql_date">,
                            <cfqueryparam value="7" cfsqltype="cf_sql_varchar">,
                            <cfqueryparam value="#Loopcount#" cfsqltype="cf_sql_integer">,
                            <cfqueryparam value="0" cfsqltype="cf_sql_varchar">)
                    </CFQUERY>   
            </cfloop>
        </cfoutput>
    <!--- Set the variable CountVar to 0. --->
        <!--- Get the about record --->
        <CFQUERY DATASOURCE="databaseExample" name="CounselorTB">
        SELECT *
        FROM CounselorTable
        </CFQUERY>
            <cfset temp = ValueList(CounselorTB.ID)>
            <cfloop index = "LoopCount" from = "1" to = "#CounselorTB.recordcount#">
                <CFSET CounselorTBArray[loopcount]=trim(listGetAt(temp, loopcount))>
            </cfloop>
    <!--- sets CounselorTBaurant count index --->   
    <cfset CountVar = 0>
    <!--- sets abort mechanism --->
    <cfset done = 1>
    <cfset pass = "no">
    <!--- set for loop allowance to return to CounselorTB.recordcount --->
    <cfset RecordCount = CounselorTB.Recordcount -1>
    <!--- sets loop condition that allows loop to continue after recordcount has been achieved --->
    <cfset RecordCount2 = CounselorTB.Recordcount +1>
    <!--- Loop until CountVar = 5. --->
    <cfloop condition = "CountVar LESS THAN OR EQUAL TO Recordcount2">
    <!--- increment todays date for date alignment --->
        <cfset todaysdate = todaysdate + 1>
    <!--- Check for date exclusions --->
        <cfif DayOfWeek(todaysdate) is not 7 AND DayOfWeek(todaysdate) is not 1>
    <!--- create loop conditions form 10 cycles --->       
            <cfif CountVar LTE Recordcount>
                <cfset CountVar = CountVar+1>
            <cfelse>
                <cfset CountVar = 1>
                <cfset Done = Done + 1>
                    <cfif done is 10>
                        <cfabort>
                    </cfif>
            </cfif>
    <!--- update schedule with CounselorTBaurants --->
                    <!--- Get the TBStudent Counselor records that contain limits --->
        <CFQUERY DATASOURCE="databaseExample" name="Schedule">
        SELECT s.SchedDateAct, s.Counselor, r.LimitationNumber, COUNT(CounselorTB) AS CounselorCount
        FROM ScheduleTable s INNER JOIN CounselorTable r
            ON s.Counselor = r.ID
        WHERE Limitation > 0 AND s.Counselor = '#CounselorTBArray[CountVar]#' AND s.SchedDateAct = #CreateODBCDate(todaysdate)#
        GROUP BY s.SchedDateAct, s.Counselor, r.LimitationNumber
        </CFQUERY>
            <cfif schedule.recordcount is not 0>
                <cfif Schedule.LimitationNumber GT Schedule.CounselorCount>
                    <CFQUERY DATASOURCE="databaseExample">
                        UPDATE ScheduleTable
                        SET Counselor = <cfqueryparam value="#CounselorTBArray[CountVar]#" cfsqltype="cf_sql_varchar">
                        WHERE SchedDateAct = #CreateODBCDate(todaysdate)# AND StudentID = 7
                    </CFQUERY>
                </cfif>
            <cfelse>
                    <CFQUERY DATASOURCE="databaseExample">
                        UPDATE ScheduleTable
                        SET Counselor = <cfqueryparam value="#CounselorTBArray[CountVar]#" cfsqltype="cf_sql_varchar">
                        WHERE SchedDateAct = #CreateODBCDate(todaysdate)# AND StudentID = 7
                    </CFQUERY>
            </cfif>
        </cfif>
    </cfloop>
    It isn't pretty but it works so far. I really don't like the queries in the loops but have tried a number of different configurations and this has worked best. I am also curious about the syntax in your example <cfset counselorRow++>. I haven't seen that one before.

Maybe you are looking for

  • Can Not Remove "with" Data from Calendar Event Details

    I currently have a Palm Tungsten|E2. For a short time I used to sync it with my work computer; this was before they replaced the computer (lease was up) with a new one where it was locked down and I could not reinstall the Palm desktop. Since then I

  • ****PLEASE HELP ME SOMEONE**** PLEASE - Re: ON SCREEN CAPS LOCK INDICATOR

    can someone please help me before i pull all of my hair out. i have windows vista - 64 bit - the HP IQ500 touchsmart with a wireless keyboard. in the systray the num caps and scroll lock appears as little blue boxes (when on). everynow and again they

  • Html tags showing up in trace();

    summary: 1 swf with 3 movieclips. mc1 has input text field "name_txt", mc2 has dynamic text field "nameOutput_txt" When I: trace (mc1.name_txt); I get the following in the Output panel: "<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Times New R

  • OS x Updates

    The following appeared after i downloaded update for OS X Your computer cant be shut down now, beacuase sotware is being installed. Incompatible Kernel Extension Configuration Data is being installed. Interrupting the install may damage your computer

  • Can I connect two iPhones to two different iTunes account on the same iMac?

    I have one (1) iMac and two (2) iPhones and two (2) iPads... I have set up two (2) login accounts on the same iMac... one for myself and another for my wife. Likewise I have setup iTunes account for myself and for my wife in both the logins... the pr