RecordSet problem

Hi,
Scenario: I loop through a recordset, and at each iteration I pass the data to a dataBean, that I then pass to a thread that is then started.
For some reason whether it is the speed of the box, the second iteration of the loop contains data that is somehow populated into what has been passed to the first thread. Is something screwed with the recordset - altho this has not happened before and cannot be replicated except in production env!! - I am wondering whether it could be the speed of the box (as it works perfectly well on other unix/xp env).
I am not sure whether it is really JDBC, I return the recordset, then return the connection to a connection pool.
Any suggested solutions would be appreciated, thanks.
<code>
public ResultSet myData() throws Exception
Connection conn = getConnection();
try
CallableStatement stmt = conn.prepareCall( mySql );
return stmt.executeQuery();
catch (Exception e)
throw new Exception( e.toString() );
finally
returnConnection( conn );
public myMethod()
RecordSet rs = myData();
while rs.Next()
dataBean.setA(rs[1]);
myThread me = new myThread(dataBean);
me.start();
</code>

Ok, that is sound advice, I have altered the code so that it does not close and return the connection until the recordset has been iterated through.
Hopefully, this was the cause as I was unable to replicate and have now promoted to production this code change which I hope is the answer.

Similar Messages

  • Nested XML from recordset problems.

    Hi
    I have been struggling with this for a while now and desperatley need som help!
    I'm trying to create a nested spryregion that looks like this:'
    http://www.soulkompetens.se/utbildningar.php#
    Problem with that page is that it only works in Safari (mac). Firefox the encoding does not work (questionmarks instead of åäö).
    Windows explorer does not work at all .
    So I started to work wit the http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html page to try to generate the xml.
    The XML should be something like:
    <DOCUMENT>
      <ROW0>
        <UTBILDNING_ID>22</UTBILDNING_ID>
        <RUBRIK>Värdegrunden som bas för affärsutveckling</RUBRIK>
        <ROW1>
          <INGRESS>Värdegrunden som bas för affärsutveckling, diskrimineringsgrunderna</INGRESS>
          <ID>17</ID>
         <TEXT></TEXT>
          <DATUM>0000-00-00</DATUM>
        </ROW1>
        <ROW1>
          <INGRESS>Västra Götaland 3:e september</INGRESS>
          <ID>34</ID>
          <TEXT></TEXT>
          <DATUM>2009-06-21</DATUM>
        </ROW1>
      </ROW0>
      <ROW0>
        <UTBILDNING_ID>25</UTBILDNING_ID>
        <RUBRIK>Omvärldsanalys</RUBRIK>
        <ROW1>
          <INGRESS>Mellersta Norrland 11:e december</INGRESS>
          <ID>35</ID>
          <TEXT></TEXT>
          <DATUM>0000-00-00</DATUM>
        </ROW1>
    </ROW0>
    </DOCUMENT>
    I get the XML from two joined Tables in the database.
    Sql looks like:
    select utbildning_rubrik.utbildning_id, utbildning_rubrik.rubrik, utbildning.ingress, utbildning.ID, utbildning.text, utbildning.datum
    from utbildning_rubrik, utbildning where utbildning_rubrik.utbildning_id = utbildning.utbildning_id
    order by utbildning_rubrik.utbildning_id, utbildning.ingress
    Now! How do I generate the XML with "query to xml".
    I have been trying a lot of things an my head is spinning around
    Can anybody help me please.
    Regards
    Olle

    Thank you for the answer.
    I think I am close. But there is something wrong wit the nesting of the nodes and repeating.
    Here is the code:
    <?php
    mysql_select_db($database_SOUL, $SOUL);
    $query_rsImages = "SELECT utbildning_rubrik.utbildning_id, utbildning_rubrik.rubrik, utbildning.ingress, utbildning.ID, utbildning.text, utbildning.datum FROM utbildning_rubrik, utbildning WHERE utbildning_rubrik.utbildning_id = utbildning.utbildning_id ORDER BY utbildning_rubrik.utbildning_id, utbildning.ingress";
    $rsImages = mysql_query($query_rsImages, $SOUL) or die(mysql_error());
    $row_rsImages = mysql_fetch_assoc($rsImages);
    $totalRows_rsImages = mysql_num_rows($rsImages);
    // Send the headers
    header('Content-type: text/xml');
    header('Pragma: public');       
    header('Cache-control: private');
    <?php echo('<?xml version="1.0" encoding="ISO-8859-1"?>'); ?>
    <DOCUMENT>
      <?php if ($totalRows_rsImages > 0) { // Show if recordset not empty ?>
        <ROW0>
        <UTBILDNING_ID><?php echo $row_rsImages['utbildning_id']; ?></UTBILDNING_ID>
        <?php do { ?><RUBRIK><?php echo $row_rsImages['rubrik']; ?>
      <ROW1>
            <?php do { ?><INGRESS><?php echo $row_rsImages['ingress']; ?></INGRESS>
            <TEXT><![CDATA[<?php echo $row_rsImages['text']; ?>]]></TEXT><?php } while ($row_rsImages = mysql_fetch_assoc($rsImages)); ?>
            </ROW1>
            </RUBRIK><?php } while ($row_rsImages = mysql_fetch_assoc($rsImages)); ?>
            </ROW0>
       <?php } // Show if recordset not empty ?>
    </DOCUMENT>
    In the other php document consuming the xml I have
    ds1.setColumnType("RUBRIK", "html");
    So the main problem with this is I dont know php so good that I can repeat the nodes to my choise.
    I neew it to be
    ROW0>
      <UTBILDNING_ID></UTBILDNING_ID>
      <RUBRIK></RUBRIK>
      <ROW1>
        <INGRESS></INGRESS>
        <TEXT></TEXT>
        <DATUM>/DATUM>
      </ROW1>
      <ROW1>
        <INGRESS></INGRESS>
        <TEXT></TEXT>
        <DATUM></DATUM>
      </ROW1>
    </ROW0>
    <ROW0>
      <UTBILDNING_ID></UTBILDNING_ID>
      <RUBRIK></RUBRIK>
      <ROW1>
        <INGRESS></INGRESS>
       <ID></ID>
        <TEXT></TEXT>
        <DATUM></DATUM>
      </ROW1>
      </ROW1>
    </ROW0>
    Can you help?
    Regards
    Olle

  • Advanced recordset problem (DW inserting totalRows variable)

    Hi, i'm using DW CS4 and am working on my first database driven site. All keeps going well til I get to a certain task. I've recreated the site separately to make sure I'd not done anything silly but the same issue arises. I've created a recordset that takes a URL variable (orgname) and filters the information into a table no problem. I've put a series of links above the table that puts a second variable into the URL so it read something like this: "...orgdetail.php?orgname=BSMC&catname=S1"
    This kind of works for one link (where it picks up the default values in the variables I believe) but then falls apart. DW also inserts another variable 'totalRows' and screws the other variables up! I apologise for the vagueness of my query and hope to post a link up tomorrow to show more but can anyone shed any light on why DW would insert the totalRows variable??
    TIA...Andre

    I've uploaded the pages:
    http://pitlanepass.com/test/testindex.php
    http://pitlanepass.com/test/testorg.php
    I Think it may be an issue between default variable values and not every organisation has a rider of every category so it's dropping the URL variable?
    Heres a snippet of the code:
    $varOrgname_rsRiderdetail = "British Supermoto";
    if (isset($_GET['orgname'])) {
      $varOrgname_rsRiderdetail = $_GET['orgname'];
    $varCatname_rsRiderdetail = "S1";
    if (isset($_GET['catname'])) {
      $varCatname_rsRiderdetail = $_GET['catname'];
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsRiderdetail = sprintf("SELECT riders.ridernumber, riders.riderfirst, riders.riderlast, riders.riderorganisation, riders.ridercat, riders.riderimage FROM riders WHERE riders.riderorganisation=%s  AND riders.ridercat=%s", GetSQLValueString($varOrgname_rsRiderdetail, "text"),GetSQLValueString($varCatname_rsRiderdetail, "text"));
    $rsRiderdetail = mysql_query($query_rsRiderdetail, $connPitlane) or die(mysql_error());
    $row_rsRiderdetail = mysql_fetch_assoc($rsRiderdetail);
    $totalRows_rsRiderdetail = mysql_num_rows($rsRiderdetail);
    $varOrgname_rsClassnavigation = "British Supermoto";
    if (isset($_GET['orgname'])) {
      $varOrgname_rsClassnavigation = $_GET['orgname'];
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsClassnavigation = sprintf("SELECT categories.catname FROM categories WHERE categories.catorganisation=%s", GetSQLValueString($varOrgname_rsClassnavigation, "text"));
    $rsClassnavigation = mysql_query($query_rsClassnavigation, $connPitlane) or die(mysql_error());
    $row_rsClassnavigation = mysql_fetch_assoc($rsClassnavigation);
    $totalRows_rsClassnavigation = mysql_num_rows($rsClassnavigation);
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsRiderdetails = "SELECT riders.ridernumber, riders.riderfirst, riders.riderlast, riders.riderID, riders.ridercat, riders.riderorganisation, riders.riderimage, riders.riderdescription FROM riders";
    $rsRiderdetails = mysql_query($query_rsRiderdetails, $connPitlane) or die(mysql_error());
    $row_rsRiderdetails = mysql_fetch_assoc($rsRiderdetails);
    mysql_select_db($database_connPitlane, $connPitlane);
    $query_rsRiderdetails = "SELECT riderID, riderfirst, riderlast, ridernumber, ridercat, riderorganisation, riderimage, riderdescription FROM riders";
    $rsRiderdetails = mysql_query($query_rsRiderdetails, $connPitlane) or die(mysql_error());
    $row_rsRiderdetails = mysql_fetch_assoc($rsRiderdetails);
    $query_rsRiderdetails = "SELECT riderID, riderfirst, riderlast, ridernumber, ridercat, riderorganisation, riderimage, riderdescription FROM riders ORDER BY ridernumber ASC";
    $rsRiderdetails = mysql_query($query_rsRiderdetails, $connPitlane) or die(mysql_error());
    $row_rsRiderdetails = mysql_fetch_assoc($rsRiderdetails);
    $totalRows_rsRiderdetails = mysql_num_rows($rsRiderdetails);
    ?>

  • Recordset problem mysql / php

    Hi
    Having a problem that I can't find a way out of. I am trying
    to create a recordset on a php / mysql setup not on my local
    machine though. I am getting an error of 500 internal server error
    when testing the connection. In the recordset builder I can see the
    db and the tables ok but when I click test I get the error. It is
    happening every time. Any ideas?

    www.DwFAQ.info wrote:
    Well when I first saw your screenshot of Recordset window I was wondering what parameter you were filtering about_id against. First now all I see is the characters *** in the drop-down option. You should pick something like URL parameter, Session Variable, Entered Value, etc. something to filter about_id against, ya know?
    That was the problem it wouldnt display session variable or or any of the other options it would only display *** no matter what I was trying to filter against....  Wasnt a huge deal since i could just hand code it but the wizard is faster
    I nuked the configuration folder and that seemed to have taken care of the problem..

  • Report with 2 data sources (TTX) & VFP memo to recordset problem

    Dear All,
    I work on this for a few weeks, but still cannot fix it. Please help.
    I use 2 TTX to create a report in CR XI. One table is do most things including grouping. Another table just contains 3 fields. Two fields are keys for left join with the main table, but it contains less key than the main table. That is some key in the main table may not exist in this one. The third field is a Memo field in Visual Foxpro. Now the memo field cannot display.
    I got 2 methods to convert the VF cursors  to Recordsets for reporting. The first one is creating a subroutine to convert the VF cursor by myself to convert VF Memo field to Recordset's adVarChar like:
    oRst.Fields.Append(<fieldname>, 201, 2147483647)
    This method didn't work
    The another method is using VFPCOM, a COM object that download from microsoft. That can convert the VF cursor to Recordset. I don't konw the type of Recordset field converted from VF Memo using VFPCOM .However, CR XI got a field mapping dialog when I preview the report. But I cannot find the correct field in the dialog.
    Could somebody help. Thank you very much.
    Regards,
    Antony

    Hello, Anthony;
    When you look at Database|Database Expert and choose the links tab, are the two .ttx files linked successfully?
    You mention that there is a field in the main table that may not exist in the second one. Is that causing a linking issue?
    The most common issue is the ADO recordset does not match the structure created in the .ttx.
    There is a dll that will allow you to create a .ttx file from each recordset exactly as Crystal Reports will see it using the "CreateFieldDefFile" function. Search your Crystal Reports XI R1 (11.0) CD for the file "p2smon.dll". It will not install automatically but you can copy it into your System32 directory and use the functionality. e.g. "C:\Windows\system32"
    It was designed for Visual Basic so the code used there is:
    Public adoRs1 As New ADODB.Recordset
    If CreateFieldDefFile(adoRs1, App.Path & "\ado.ttx", True) <> 0 Then
       MsgBox "Field definition successfully created"
    Else
       MsgBox "Failed to create field definition file"
    End If
    If you cannot complete this step, I suggest opening a SAP Support incident and an engineer could so this step for you using your ado recordset saved as an ADO file.
    Again in Visual Basic:
    adoRs1.save "C:\Temp\adoRS1.ttx"
    adoRs2.save "C:\Temp\adoRS2.ttx"
    Then the two created .ttx files can be tested in the report to see if they can be linked and verified.
    Elaine

  • Recordset Problems

    I am using ASP VBScript, Dreamweaver 8, and everything works
    fine, database connections, testing/remote servers. I have a
    section on repeat region of 5 records per page. 5 records show up
    fine on every page except for the last. Whenever I get to the last
    page there are missing records. The number of missing records is
    equal to the number of pages that are generated by the query,
    regardless of if they were viewed or not. For example, I have 9
    records on a 5 record repeat. When I go to the second page there
    are only 2 records, 2 less than what should be (5 on first page, 4
    on second). When I change that same repeat region to 2 records per
    page, I get 2 records on all page until I get to the "last page"
    which is actually just records 5-6, because a total of three pages
    are shown, so records 7,8, and 9 dissapear. Is this a common
    problem, and if so what is the fix? Thank you for your help,
    Jason Farneth

    I am using ASP VBScript, Dreamweaver 8, and everything works
    fine, database connections, testing/remote servers. I have a
    section on repeat region of 5 records per page. 5 records show up
    fine on every page except for the last. Whenever I get to the last
    page there are missing records. The number of missing records is
    equal to the number of pages that are generated by the query,
    regardless of if they were viewed or not. For example, I have 9
    records on a 5 record repeat. When I go to the second page there
    are only 2 records, 2 less than what should be (5 on first page, 4
    on second). When I change that same repeat region to 2 records per
    page, I get 2 records on all page until I get to the "last page"
    which is actually just records 5-6, because a total of three pages
    are shown, so records 7,8, and 9 dissapear. Is this a common
    problem, and if so what is the fix? Thank you for your help,
    Jason Farneth

  • SHow Recordset problem

    I'm not well versed in ASP. I have one page where I have 3
    regions Two are recordsets. THe other is text that says "sorry no
    items at this time" THe two recordsets are filtered by the URL
    parameter. the recordsets show up correctly when the parameter is
    passed. THe "sorry no items at this time" brings up the error:
    ADODB.Field error '800a0bcd'
    Either BOF or EOF is True, or the current record has been
    deleted. Requested operation requires a current record.
    IS there a way to get these 3 items to work together using IF
    <% If rsAllType.EOF And rsAllType.BOF Then %>
    <div><p>
    <span class="subtitle">
    <%=(rsAllCourses.Fields.Item("Type").Value)%> <%=(rsAllCourses.Fields.Item("SubType").Val ue)%>
    Courses
    </span><br /><br />
    <% While ((Repeat4__numRows <> 0) AND (NOT
    rsAllCourses.EOF)) %>
    <span class="boldgray">
    <a href="CourseDetail.asp?<%=
    Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) &
    "CourseID=" & rsAllCourses.Fields.Item("CourseID").Value
    %>">
    <%=(rsAllCourses.Fields.Item("Title").Value)%></a></span>
    <br />
    <%=(rsAllCourses.Fields.Item("Description").Value)%><br
    />
    <span
    class="bold">Prerequisites: </span><%=(rsAllCourses.Fields.Item("Prerequisites").Value)%>
    <br /><br />
    <% Repeat4__index=Repeat4__index+1
    Repeat4__numRows=Repeat4__numRows-1
    rsAllCourses.MoveNext()
    Wend %>
    </p></div>
    <% End If ' end rsAllType.EOF And rsAllType.BOF %>
    <% If rsAllCourses.EOF And rsAllCourses.BOF Then %>
    <div>
    <span
    class="subtitle"><%=(rsType.Fields.Item("Type").Value)%> <%=(rsSubType.Fields.Item("SubTy pe").Value)%>
    Courses</span><br />
    <br />
    No classes at this time, please check back soon. <br
    />
    </p>
    </div>
    <% End If ' end rsAllCourses.EOF And rsAllCourses.BOF
    %>
    <% If Not rsAllType.EOF Or Not rsAllType.BOF Then %>
    <p>
    <span class="subtitle">All
    Courses</span><span class="boldgray"> <br />
    <br />
    Listed
    Alphabetically</span>        <a
    href="<%=MM_movePrev%>">&lt;&lt;  Previous</a>        <a
    href="<%=MM_moveNext%>">Next  &gt;&gt;</a><br
    />
    <br />
    </p>
    <%
    While ((Repeat5__numRows <> 0) AND (NOT rsAllType.EOF))
    %>
    <div>
    <p>
    <span class="boldgreen">
    <%=(rsAllType.Fields.Item("Title").Value)%></span><br
    />
    <%=(rsAllType.Fields.Item("Description").Value)%><br />
    <span
    class="bold">Prerequisites: </span><%=(rsAllType.Fields.Item("Prerequisites").Value)%><br
    />
    <span
    class="bold">Category: </span><%=(rsAllType.Fields.Item("Type").Value)%><br
    />
    <span
    class="bold">Curriculum:</span><%=(rsAllType.Fields.Item("SubType").Value)%><br
    />
    <br /></p>
    </div>
    <% Repeat5__index=Repeat5__index+1
    Repeat5__numRows=Repeat5__numRows-1
    rsAllType.MoveNext()
    Wend %>
    <% End If ' end Not rsAllType.EOF Or NOT rsAllType.BOF
    %>

    redant34jessica wrote:
    > If AllCourses NOT empty display AllCourses (there are
    links on page to display
    > this filtered recordset using URL Parameter - "TypeID")
    <% If Not rsAllCourses.EOF Or Not rsAllCourses.BOF Then
    %>
    > If AllCourses empty and AllTypes NOT empty show AllTypes
    (there is a link on
    > page to display ALL using a URL Parameter- "Type")
    If (rsAllCourses.EOF AND rsAllCourses.BOF) AND (NOT
    rsAllTypes.EOF OR
    NOT rsAllTypes.BOF) Then %>
    > If AllCourses empty and AllTypes empty show warning
    message (If there is no
    > data a link on page where there is currently no data)
    <% If rsAllCourses.EOF And rsAllCourses.BOF AND
    rsAllTypes.EOF And
    rsAllTypes.BOF Then %>
    > Another Question is when a recordset is filtered by a
    URL parameter, if that
    > URL parameter does not exist in the URL is the recordset
    EMPTY??
    That depends on what you set the default value to be. I try
    to use a
    value that will never be used, like -1, so when the URL
    parameter
    doesn't exist, the recordset uses -1 instead. It won't find a
    record
    with -1 as the value, so returns an empty recordset.
    > Please help. THank you very much!
    See how you get on with the above.
    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

  • (PHP/MySql) Create Recordset but no column

    Thanks for reading this, I am new to PHP/MySql
    I have created a website www.ritchiecraft.co.uk which uses
    PHP/MySql with Dreamweaver 8. I have created recordsets on most
    items pages and filtered data as neccessary. After the site was up
    and running I was required to insert a new topic and when I went to
    create a new page and insert the recordset no data was placed in
    the columns area and the filter/sort options were greyed out. I
    checked the existing pages and found that this was happening to all
    pages with recordsets. The connection, table data was there.
    The site still works fine but I cannot introduce new pages or
    edit existing because of the recordset problem. I was advised
    previously to delete the Dreamweaver cache file but this did not
    help.
    The site is hosted commercially and the database was created
    with phpMyAdmin and dont seem to have any connection problems.
    Thanks for your time and any suggestions are welcome.

    sweetman wrote:
    > How can I set a query so that it sounds like this:
    >
    > SELECT $_GET['id'] FROM mytable ORDER BY myorder ASC?
    You can't do it through the Recordset dialog box. The simple
    way to do
    it is to create this query in the Recordset dialog box:
    SELECT * FROM myTable
    ORDER BY myOrder ASC
    Then go into Code view and locate the following line:
    $query_recordsetName = "SELECT * FROM myTable ORDER BY
    myOrder ASC";
    Change it to this:
    if (isset($_GET['id'])) {
    $col = get_magic_quotes_gpc() ? stripslashes($_GET['id']) :
    $_GET['id'];
    $col = mysql_real_escape_string($_GET['id']);
    else {
    $col = '*';
    $query_recordsetName = "SELECT $col FROM myTable ORDER BY
    myOrder ASC";
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Performance problem with recordset object

    Hi,
    I have a performance problem with record set object. Is it true using RecordSet object as argument to the method will cause any perfomance degradation?
    here is my code.
    finStmtList = selectFinancialStatements(rs, shortFormat, latestOnly, true);
    I changed the code by populating the recordset in the method that called the above statement. previously the population of valueobject is within the select FinancialStatements.
    Now the method looks like
    finStmtList = selectFinancialStatements(ValueObject, shortFormat, latestOnly, true);
    Is this fix will result in any performance gain?

    Can any one suggest me that the above RecordSet Object contains large number of records that counts up to 1000 rows and having 30 columns? I tested the application. But the performance varies from time to time.
    Is there any other way to fine tune it?

  • Problem with recordset structure sequence

    Hi,
    I have a problem with my file cotent conversion.
    When i specify my recordstructure sequence as R1,1,R2,*
    the file is picked up but cannot be seen in MONI.
    but when i specify as R1,1,R2,2(OR 3 OR 4)
    The file is processed and seen in MONI.
    But when i give * to any of the records processing in XI fails..
    Please let me know wht must be going wrong
    Regards
    Venkat

    Venkat,
    I tried with your file and i am receiving the xml after conversion in sxmb_moni without any problem (no matter the file size )
    Can you try the following for your file,
    Recordset name : Details
    Recordset str. : Header,1,Body,*
    Key field name : field2
    Content conversion
    Header.fieldFixedLengths     3,2,10,27,8,8,8
    Header.fieldNames     field1,field2,field3,field4,field5,field6,field7
    Header.keyFieldValue     01
    Body.fieldFixedLengths     3,2,40,110,15,2
    Body.fieldNames     field1,field2,field3,field4,field5,field6
    Body.keyFieldValue     02
    ignoreRecordsetName     true
    ~ShaBZ~

  • Problem - Multiple recordsets in one page

    Hi,
    Is it possible to use more than 1 recordset in a single page?
    Dreamweaver acts like there should be no problem, but when I upload
    & test the page I just get an error message saying there's a
    problem processing the requested URL. Each table and field has a
    unique name. I'm using ASP VBScript on Win2000 with Access DB.
    Please help!
    Ian

    The simple answer is yes, multiple recordsets are OK. I'd
    suggest re-posting - explaining what you're trying to do, what the
    errors say and supplying code or a URL so people can see what
    you're doing.

  • 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.

  • MySQL database - Recordset's echoing problem

    Gary, David & any other PHP wizards, listen up -
    Today I decided to use a MySQL database to hold my articles
    in, and then
    call them with a recordset when applicable. Everything works
    really, really
    nicely except for one thing.
    If you go here:
    http://sourtea.com/articles2.php
    And select "Read this article" for any of the articles,
    scroll down to the
    bottom where the comment form is and you'll see some PHP code
    being
    echo'ed - which isn't supposed to be.
    I've noticed in IE - it's always displayed with all articles,
    but on
    Firefox, it seems to only happen with the first article you
    open up, then
    all the others are fine.
    I'm calling the recordsets inside of my php cases, for
    example:
    <?php
    break;
    case 10:
    ?>
    <?php echo $row_getArticles['textfields']; ?>
    <?php
    break;
    case 20:
    ?>
    And so on.
    Now, everything in the "textfields" row is the physical HTML
    and PHP code
    that will write and display the article and the comment form.
    It seems that something is getting scrambled, or that I need
    to write the
    PHP code differently inside the table...
    Help?
    Thanks for your time,
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Web Dev Articles, Photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================

    Hi Joe -
    I did cut and paste the code from DW into the table. I just
    finished up,
    actually, with another solution. I entered the code for the
    comment form
    into a .txt file, and used it as a PHP include for the
    articles.
    Also, for the action of the form (since it's the same form
    being used for
    three different pages) - I set a variable when it calls a
    certain Recordset,
    and then did an "if, elseif" statement inside the .txt file
    where it will
    echo out the appropriate page, depending upon which article
    the user is at.
    For example (from my code):
    <form id="contact_form" action="articles.php?ref=<?php
    if($var == 10) { echo
    '10'; } elseif($var == 20) { echo '20'; } elseif($var == 30)
    { echo '30'; }
    ?>" method="post">
    That's was really the only problem I had to overcome because
    I'm using the
    same form for all three articles (assigning the proper
    action).
    Thanks for the help, Joe - though, I'm not sure if your
    suggestion would
    have worked! Maybe I'll try it sometime...
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Web Dev Articles, Photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]...
    > On Wed 30 Aug 2006 02:08:30p, Shane H wrote in
    macromedia.dreamweaver:
    >
    >> Thanks for the prompt reply. Is there a way around
    this (e.g., being
    >> able to include the PHP code in the row)?
    >
    > Is the PHP code being pulled in from the database? I'm
    not where I can
    > test it right now, but I believe that it won't be
    executed. The only way
    > would be to have it in the page itself.
    >
    > For example:
    >
    > <input
    > name="namefield"
    > class="contactfield"
    > id="namefield"
    > value="&lt;?php if(isset($_POST['namefield'])) echo
    htmlentities($_POST
    > ['namefield']);?&gt;"
    > tabindex="1"
    > accesskey="1"
    > type="text">
    >
    > You can't have that in the data. You could do this:
    >
    > <input
    > name="namefield"
    > class="contactfield"
    > id="namefield"
    > value="<?php if(isset($_POST['namefield'])) echo
    htmlentities($_POST
    > ['namefield']);?>"
    > tabindex="1"
    > accesskey="1"
    > type="text">
    >
    > Or maybe you cut and pasted code, and got the character
    entities &lt;
    > &gt; rather than <>?

  • Recordset Nav Problem

    I have a recordset that returns several results in a repeat region. It works fine until I try and insert a recordset navigation. I keep getting mysql_num_rows supplied argument is not a valid mysql result resource error on line 121 (which is: $totalRows_rsSearch = mysql_num_rows($all_rsSearch);). Is this one of the occasions that I need to move the recordset code somewhere? I know sometimes DW puts code after the fact which returns an error. I know I have results in this page, which show until I add navigation. Anyone familiar with this? It is a lot of code...so I didn't want to post it. I can though if I need to. Thanks!

    This was a problem with POST as soon as I changed it all to
    GET the problem went away. I haven't a clue why this happened. Went
    back a few times and the same thing happened everytime.
    Using POST on other pages in my website no problems.

  • Problem to update UDO-recordsets using a matrix with DBDataSource

    Hello,
    I've got a problem with updating recordsets in an UDO-Table using DBDataSource.SetValue().
    Special szenario: I use a matrix bounded with DBDataSources. Adding new records and loading them via DBDataSource.Query() with conditions works fine. The UDO object type is "Document" without lines.
    In the simple way now I load just one record and after this I was trying to set an "message" to an simple, editable edittext-column via calling:
    oDBDataSource.SetValue("U_Message", 0, "Hello world");
    oMatrix.LoadFromDataSource();
    Now it's visible in the matrix.
    But when I call update via clicking the update-button, B1 do say, everything was ok (green status-message). Reloading this recordset you can see: it was not stored in the database
    Even not after:
    oMatrix.FlushToDataSource();
    As a workaround I do write the "message" via using Cell.Specific.
    Can anybody help me?
    I'am using SBO 2005 A SP 01 PL 39
    Edited by: Christian Bührig on Mar 18, 2008 4:48 PM

    look at
    New Row in Matrix is a Duplicate and Cannot update Object with new Row
    the next way is do it with recordset and directly insert to table.
    hope it helps
    Petr

Maybe you are looking for