ASP VBScript to XML RSS question

I'm just not getting this to work in ASP VBScript.  I just want to loop the recordset so I have all the rows be translated into a xml based rss feed.  What I have makes sense to me, but I only get the first record no matter what I try.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/cnConn.asp" -->
<%
set rsJobs = Server.CreateObject("ADODB.Recordset")
rsJobs.ActiveConnection = MM_cnConn_STRING
rsJobs.Source = "SELECT id, city, [state], jobtype, datePosted FROM DatabaseTable"
rsJobs.CursorType = 0
rsJobs.CursorLocation = 2
rsJobs.LockType = 3
rsJobs.Open()
rsJobs_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rsJobs_numRows = rsJobs_numRows + Repeat1__numRows
%>
<%
response.write "<?xml version=""1.0"" encoding=""utf-8""?>"
response.write "<rss version=""2.0"">"
response.write "<channel>"
response.write "<title></title>"
response.write "<link>/</link>"
response.write "<description></description>"
%>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsJobs.EOF))
%>
<%
  response.write "<item>"
  response.write "<title>" & (rsJobs.Fields.Item("jobtype").Value) & "</title>"
  response.write "<description>" & (rsJobs.Fields.Item("city").Value) & ", " & (rsJobs.Fields.Item("state").Value) & "</description>"
  response.write "<link>domain</link>"
  response.write "<pubDate>" & (rsJobs.Fields.Item("dateposted").Value) & "</pubDate>"
  response.write "</item>"
%>
<%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsJobs.MoveNext()
Wend
%>
<%
response.write "</channel>"
response.write "</rss>"
%>
<%
rsJobs.Close()
Set rsJobs = Nothing
%>

Just giving it a casual look I don't see why it is not working. But why are you declaring all of those counters and then not using them? Seems to overly complicate things. I would get rid of all references to:
rsJobs_numRows
Dim Repeat1__numRows
Dim Repeat1__index
and then change the while loop test to:
While (NOT rsJobs.EOF)
It shouldn't really matter, since your counter used in the while test starts at -1 and is decremented so it should never = 0, but still, it's confusing to read.
And of course, verify that the select statement actually returns more than one row. Use the recordcount property of the recordset.

Similar Messages

  • Code Coloring, ASP/VBScript, & CS5

    My IT area has set up the web  server  to process all .HTM files as if they were .ASP. Subsequently, I  cannot  view my HTM files as they would appear if they were "true" ASP  files in  Dreamweaver CS5. I applied the changes described in TechNote  16410 to MMDocumentTypes.xml (removing the HTM extension from the winfileextension and macfileextension attirbutes of the HTML InternalType and adding the HTM extension to the winfileextension and macfileextension attirbutes of the ASP-VBScript InternalType). I moved HTM in Extensions.txt from the HTML Documents line to the Active Server Pages line and I removed the backup I had made of MMDocumentTypes.xml from the Adobe directory.
    Based on another posting in this forum regarding code coloring, I added <%@LANGUAGE="VBSCRIPT"%> to the first line of my HTM (ASP) file.
    No matter which file with the HTM extension I open in Dreamweaver, I get this message:
    When  this happens also I need to terminate Dreamweaver using Windows XP's  Task Manager.  File > Close, application "close" [X] button, Ctrl+Q  and Alt+F4 do not  work.

    As far as I know (could be wrong here), DW does not allow you to alter the behavior of htm(l) files. The technote is aimed at adding new file types that DW doesn't already recognize.

  • Simple call to stored function from asp (vbscript) adodb

    please let me know if this question would be better suited to another forum.
    i am simply attempting to call an oracle stored function that returns a varchar2 from an asp vbscript page using adodb. i have calling of stored procedures working fine.
    attempting to call the function with the following code:
    set sp_aprvd_cr = Server.CreateObject("ADODB.Command")
    sp_aprvd_cr.ActiveConnection = MM_MHR_CONN_STR_STRING
    sp_aprvd_cr.CommandType = 4
    sp_aprvd_cr.CommandTimeout = 0
    sp_aprvd_cr.Prepared = true
    sp_aprvd_cr.CommandText = "PMS.sp_hpmsq054_aprvd_cr"
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("IP_PMSPT_ID", 200, 1,10,sp_aprvd_cr__P_PMSPT_ID)
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("return_param", adVarchar, adParamOutput)
    set rst_aprvd_cr = sp_aprvd_cr.Execute
    suspect that preparing the return code is where i am having troubles.
    any examples or assistance would be greatly appreciated.
    thanks in advance.

    Return value from stored function must be the first parameter in the parameters collection.
    So, try this instead,
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("return_param", adVarchar, adParamOutput)
    sp_aprvd_cr.Parameters.Append sp_aprvd_cr.CreateParameter("IP_PMSPT_ID", 200, 1,10,sp_aprvd_cr__P_PMSPT_ID)Cheers,
    NH

  • Need to update a record on page load. How? (ASP/VBScript)

    The standard Update Record behavior requires a form on the page, plus a recordset to identify the value to be updated. In my scenario, the value for the record to be updated is already in the URL as the ID. I just don't know how to write it myself and Dreamweaver won't do this.
    The page I want to do this on is a record detail page, so there is already a record ID already present in the querystring. The record is new until a user views it, and what I need is something that just writes a simple value to one field in the table for the record being viewed. This is it in a nutshell:
    Using the value from the ID in the URL querystring, update the "viewed" field in a specific table with the value of "y".
    This would be the first operation as the page loads and then the page would load and show the data that it already does.
    I'd be happy with raw code is someone is generous enough to provide that, or perhaps some instructional help on reverse engineering the standard update record code generated by Dreamweaver. Or, if you know of any extensions designed to do this - I'd be interested in that too!
    My app I'm working on is in ASP/vbscript.
    Subject line edited by moderator to indicate server model

    Good point! I wasn't thinking about how that would make the app vulnerable to sql injection.
    The function I want to perform is similar to how an email changes from unread to read when you view it. I simple want the records being viewed to take on the status of being read or "viewed". Perhaps I'm going about this in the wrong way, but I've been planning to use a database field as the indicator of whether a record has a viewed status or not. Null value is new, and a value of "y" (yes) meaning the value is viewed/read.
    If you have a better recommendation, I'm all ears.

  • ASP VBScript

    I created a simple update ASP VBscript form in Dreamweaver 8.
    However the connection to my DB no longer works if someone enters
    quotation marks. The quotation marks appear in my DB however the
    connection is then broken, I think this is because quotation marks
    and apostrophes are classed as special characters. Can anyone
    advise me how I can modify my code to replace them with double
    apostrophes?
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_connDB_STRING
    MM_editCmd.CommandText = "UPDATE connDB SET title1 = ?,
    body1 = ?, title2 = ?, body2 = ?, title3 = ?, body3 = ? WHERE body1
    = ?"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202, 1, 50,
    Request.Form("textfield"))
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    > Are developers "jumping ship" when it comes to ASP
    VBScript development?
    I love the VB.
    Dan Smith > adobe community expert
    http://www.dsmith.tv

  • Update multiple records with Update Command Dreamweaver 8.0.2 - ASP VBScript

    Dreamweaver 8.0.2 - Language ASP – VBScript
    I’m trying to update more than one record at a time
    using checkboxes. I’ve successfully done this numerous times
    prior to Dreamweaver 8.0.2.
    Before Dreamweaver 8.0.2, I would create a page with a
    recordset, form, checkbox and repeat region and pass the ID to
    another page containing an ‘Update Command’. The code
    on the Update page looked similar to the following:
    <%
    if(Request.QueryString("MemberID") <> "") then
    spMemberApproving__MMColParam = Request.QueryString("MemberID")
    %>
    <%
    set spMemberApproving = Server.CreateObject("ADODB.Command")
    spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1 WHERE MemberID IN (" +
    Replace(spMemberApproving__MMColParam, "'", "''") + ")"
    spMemberApproving.CommandType = 1
    spMemberApproving.CommandTimeout = 0
    spMemberApproving.Prepared = true
    spMemberApproving.Execute()
    Response.Redirect("default.asp")
    %>
    However, in Dreamweaver 8.0.2 when you fill out the Update
    Command dialog box, Dreamweaver asks you to provide the
    ‘Type’ and ‘Size’ for the variables (see:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
    That being said and done, the code on the Update page looks
    like the following:
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
    If condition = "" Then
    MM_IIf = ifFalse
    Else
    MM_IIf = ifTrue
    End If
    End Function
    %>
    <%
    if(Request.QueryString("MemberID") <> "") then
    spMemberApproving__MMColParam = Request.QueryString("MemberID")
    %>
    <%
    Set spMemberApproving = Server.CreateObject ("ADODB.Command")
    spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1 WHERE MemberID IN (?) "
    spMemberApproving.Parameters.Append
    spMemberApproving.CreateParameter("MMColParam", 202, 1, 10,
    MM_IIF(Request.QueryString("MemberID"),
    Request.QueryString("MemberID"), spMemberApproving__MMColParam
    spMemberApproving.CommandType = 1
    spMemberApproving.CommandTimeout = 0
    spMemberApproving.Prepared = true
    spMemberApproving.Execute()
    Response.Redirect("default.asp")
    %>
    The Update Command works perfectly when only 1 record is
    being updated. However, when I try to update more than one record I
    get the following error:
    Error Type:
    ADODB.Command (0x800A0D5D)
    Application uses a value of the wrong type for the current
    operation.
    /issues_manager/admin/members_approving.asp, line 27
    Can anyone help me out?

    Yes, this is a bug in Dreamweaver 8.0.2. The only workaround
    is to stay with
    8.0.1 or to hand-code the query. Adobe removed most of the
    useful ways to
    use Commands and Recordsets in 8.0.2 and limited it to basic
    queries.
    Tom Muck
    co-author Dreamweaver MX 2004: The Complete Reference
    http://www.tom-muck.com/
    Cartweaver Development Team
    http://www.cartweaver.com
    Extending Knowledge Daily
    http://www.communitymx.com/
    "Button1" <[email protected]> wrote in message
    news:[email protected]...
    > Dreamweaver 8.0.2 - Language ASP ? VBScript
    >
    > I?m trying to update more than one record at a time
    using checkboxes.
    > I?ve
    > successfully done this numerous times prior to
    Dreamweaver 8.0.2.
    >
    > Before Dreamweaver 8.0.2, I would create a page with a
    recordset, form,
    > checkbox and repeat region and pass the ID to another
    page containing an
    > ?Update Command?. The code on the Update page looked
    similar to the
    > following:
    >
    > <%
    > if(Request.QueryString("MemberID") <> "") then
    > spMemberApproving__MMColParam =
    > Request.QueryString("MemberID")
    > %>
    >
    > <%
    >
    > set spMemberApproving =
    Server.CreateObject("ADODB.Command")
    > spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    > spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1
    > WHERE MemberID IN (" +
    Replace(spMemberApproving__MMColParam, "'", "''") +
    > ")"
    > spMemberApproving.CommandType = 1
    > spMemberApproving.CommandTimeout = 0
    > spMemberApproving.Prepared = true
    > spMemberApproving.Execute()
    >
    > Response.Redirect("default.asp")
    > %>
    >
    > However, in Dreamweaver 8.0.2 when you fill out the
    Update Command dialog
    > box,
    > Dreamweaver asks you to provide the ?Type? and ?Size?
    for the variables
    > (see:
    >
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4e6b330a
    >
    >
    >
    > That being said and done, the code on the Update page
    looks like the
    > following:
    >
    > <%
    > ' IIf implementation
    > Function MM_IIf(condition, ifTrue, ifFalse)
    > If condition = "" Then
    > MM_IIf = ifFalse
    > Else
    > MM_IIf = ifTrue
    > End If
    > End Function
    > %>
    >
    > <%
    > if(Request.QueryString("MemberID") <> "") then
    > spMemberApproving__MMColParam =
    > Request.QueryString("MemberID")
    > %>
    > <%
    >
    > Set spMemberApproving = Server.CreateObject
    ("ADODB.Command")
    > spMemberApproving.ActiveConnection =
    MM_connIssuesManager_STRING
    > spMemberApproving.CommandText = "UPDATE tblMembers SET
    MemberApproved = 1
    > WHERE MemberID IN (?) "
    > spMemberApproving.Parameters.Append
    > spMemberApproving.CreateParameter("MMColParam", 202, 1,
    10,
    > MM_IIF(Request.QueryString("MemberID"),
    Request.QueryString("MemberID"),
    > spMemberApproving__MMColParam & ""))
    > spMemberApproving.CommandType = 1
    > spMemberApproving.CommandTimeout = 0
    > spMemberApproving.Prepared = true
    > spMemberApproving.Execute()
    >
    > Response.Redirect("default.asp")
    > %>
    >
    >
    > The Update Command works perfectly when only 1 record is
    being updated.
    > However, when I try to update more than one record I get
    the following
    > error:
    >
    > Error Type:
    > ADODB.Command (0x800A0D5D)
    > Application uses a value of the wrong type for the
    current operation.
    > /issues_manager/admin/members_approving.asp, line 27
    >
    >
    > Can anyone help me out?
    >
    >

  • ASP VBScript producing Dreamweaver Javascript Error Messages

    Do almost anything in Dreamweaver CS4 with ASP VBScript seems to produce javascript error messages.  can be a blank page, and you try to create a recordset... error box, error box, and then the code gets inserted but is not in the server behaviors panel.  i'm usually working in php and have never had this problem, but it's quite annoying to work that way... being forced to hand code a lot simple because dreamweaver isn't working correctly.
    warning one:
    the following javascript error(s) occurred:
    warning two:
    while executing findServerbehaviors in Recordset.htm, a JavaScript error occurred
    deleted .dat file and restarted dreamweaver, per some discussions via google... did nothing.

    anyone know how to fix this issue with dreamweaver?

  • Xml pdf questions

    Trying to create a pdf from xml using asp<br /><br />I created the following code.  The form appears without the field being populated.  I went into designer pull up the pdf added some data and tried<br />to export the data as xml and xdp.  The xml shows with no data. Trie to open xdp its say unable to locate template.<br /><br />Is this xml correct?  (this is being used in designer to perform the <br />binding<br /><?xml version="1.0" encoding="UTF-8"?><br /><TextField1><value>Howard</value></TextField1><br /><br />After I have binded the field<br /><br />I use the following asp to display the pdf with<br />the one field filled in.<br /><br />Is this xml correct?<br /><br /><%<br />Response.ContentType = "application/vnd.adobe.xdp+xml"<br />response.write   "<?xml version='1.0' encoding='UTF-8'?>"<br />response.write  "<?xfa generator='AdobeDesigner_V7.0' APIVersion='2.2.4333.0'?>"<br />response.write  "<xdp:xdp xmlns:xdp='http://ns.adobe.com/xdp/'>"<br />response.write  "<xfa:datasets xmlns:xfa='http://www.xfa.org/schema/xfa-data/1.0/'>"<br />response.write  "<xfa:data xfa:dataNode='dataGroup'>" <br />response.write  "<form><TextField1><value><text>Howard</text></value></TextField1></form>"<br />response.write  "</xfa:data>" <br />response.write  "</xfa:datasets>"<br />response.write  "<pdf href='http://159.83.96.138/prod/myFirstShot.pdf' xmlns='http://ns.adobe.com/xdp/pdf/' />"<br />response.write  "<xfdf xmlns='http://ns.adobe.com/xfdf/' xml:space='preserve'>" <br />response.write  "<annots/>" <br />response.write  "</xfdf>" <br />response.write  "</xdp:xdp>" <br />Response.Flush <br />Response.End <br />             <br />%>

    I can't answer directly, but when discussing a specialized tool, you might also read/ask here
    Acrobat SDK Developer Forum http://forums.adobe.com/community/acrobat/acrobat_sdk
    It may be that a developer can answer your questions about "why"

  • XML/RSS feeds

    so im loading an xml file from an rss feed into a datagrid, i
    then want to do a search on the column to see if a specific word
    comes before the next.
    example: loads several items(strings of text) from the xml
    file into the datagrid,
    i need to select which item to search
    and then have it tell me which word came first in that
    string/item(eg. red, or blue)
    i have it successfully loading the xml file and putting it in
    the datagrid, i just cant figure out how to search specific items
    and how to see which of those 2 words comes first in any given
    item/string

    Can you use indexOf() and then compare the indicies to see
    which one is less.
    if (string.indexOf("red") < string.indexOf("blue")) {
    // red came first
    } else {
    // blue came first
    Not sure if I understood your question completely, but
    thought I would give it a shot.
    Tim

  • Basic  XML Publisher Question: How to access tags in the higher levels?

    Hi All,
    We have a basic question in XML Publisher.
    We have a xml hierarchy like below:
    <CD_CATALOG>
    <CATALOG>
    <CAT_NAME> CATALOG 1</CAT_NAME>
    <CD>
    <TITLE>TITLE1 </TITLE>
    <ARTIST>ARTIST1 </ARTIST>
    </CD>
    <CD>
    <TITLE> TITLE2</TITLE>
    <ARTIST>ARTIST2 </ARTIST>
    </CD>
    </CATALOG>
    <CATALOG>
    <CAT_NAME> CATALOG 2</CAT_NAME>
    <CD>
    <TITLE>TITLE3 </TITLE>
    <ARTIST>ARTIST3 </ARTIST>
    </CD>
    <CD>
    <TITLE> TITLE4</TITLE>
    <ARTIST>ARTIST4 </ARTIST>
    </CD>
    </CATALOG>
    </CD_CATALOG>
    We need to create a report like below:
    CATALOG_NAME     CD_TITLE     CD_ARTISTCATALOG 1     TITLE1     ARTIST1
    CATALOG 1     TITLE2     ARTIST2
    CATALOG 2     TITLE3     ARTIST3
    CATALOG 2     TITLE4     ARTIST4
    So we have to loop at the level of <CD> using for-each CD. But when we are inside this loop, we cannot access the value of CAT_NAME which is at a higher level.
    How can we solve this?
    Right now, we are using the work-around of set_variable and get_Variable. We are setting the value of CAT_NAME inside an outer loop, and using it inside the inner loop using get_variable.
    Is this the proper way to do this or are there better ways to do this? We are running into troubles when the data is inside tables.

    you can use
    <?../CAT_NAME?>copy past to your template
    <?for-each:CD?> <?../CAT_NAME?> <?TITLE?> <?ARTIST?> <?end for-each?>

  • XML PUBLISHER Questions

    Hi All,
    Following questions restrict to use of functionalities of XMLP:
    1. What could be functionality of Delivery manager of XMLP?
    2. How could process Delivery manager an user request?
    3. Delivery manager is full of Java API’s that means apps developer must know java. Am I correct? If it is Yes, what are java concepts need know so that developer can do his job successfully?
    4. What could be sub-template concept in XMLP? Please give one practical scenario.
    5. One scenario: I want generate group of invoices in PDF format and each invoice must generate in fresh page.
    XML Input to Template: Report output (output format in XML)
    Input parameters: Customer or Print date (i.e. all invoices of specified customer should populate)
    I could not able to generate each invoice in fresh page. Is it possible through XMLP?
    6. XSL: is language and used for transformation i.e. one form document to another form document (xml =>XHTML) am I correct?
    7. When do we go for XSL implementation in XMLP? Please provide example.
    8. Where do we write XSL code in template? Assume template I am using RTF form field method.
    Any help would appreciate.
    Thanks,
    [email protected]
    Date: 13-Aug-07.
    Hi All,
    What could be the difference between delivery manager and Document Processor engine?
    Could we use both for deliver XMLP documents to different Delivery channels?
    Thanks,
    [email protected]
    Message was edited by:
    user553699

    Hi All,
    I am also facing new problem while i am going to register template in following environment:
    Oracle applications version: 11.5.10.2
    XML publisher Version: 5.0.0
    My file size: 65 KB with out image
    363 KB with company logo
    The RTF used English language characters and want to register for English – USA
    My RTF template works fine in preview mode in Word. I go to upload it via XML Publisher Adminstator and I get a screen that just says "You have encountered an unexpected error. Please contact the System Administrator for assistance."
    What? The only option is Log out. Is there a way to validate my template to know what could possibly be wrong with it?
    Please let me know if any other information require about RTF template.
    Any help would appreciate.
    Thanks,
    Sai.Krishna @cavaya.com
    P.S: I do not know how to attach file in forum. please give me information how to attach file form so that i can attach RTF file.

  • XML (RSS) Spry Dataset File Works in Preview But Not Over Internet

    hello
    I am trying to build a custom feed reader using the Spry framework in Dreamweaver CS4 and everything seems to go smoothly until I actually host the file (with the accompanying js and css files) and try to view it over the internet
    previewing from DW shows everything working the way it should
    I feel like I am missing something obvious ... but not sure what
    thanks for any help!

    Hi, i have a similar problem..
    These URL returns a XML:
    1) http://www.bolsadesantiago.com/intradayServlet?symbol=IPSA
    2) http://www.valorfuturo.com/contenidos_vf/proyectos/clientes/penta/titularnoticias.asp
    I use a CS4 and both works in preview, but only first works over internet (IE7).
    I suspect that 2° has a problem of syntax XML, but work with jQuery.

  • XML/XSLT question

    At the moment my java servlet just takes content from an ArrayList and populates html blocks that get concatenated and thrown to the client as a html page. This is not the best way to do things because the java code and html vocabulary is interspersed.
    In a bid to seperate the presentation(html code) from the logic(java code) I am turning to XSLT. From my research this takes as input an XML file that contains the content. But how do you insert the content? Is there a standard way? When the tranformation from XML to html is complete, how do you hand back the resulting html page within the java application? Thanks in advance.

    One solution would be to use a JSP. It can retrieve the ArrayList from the Servlet and use it to build HTML. At least that way the mixture of HTML and Java is minimized in the source form. (Behind the scenes, the JSP is turned into a Servlet, so the mixture is still there, it is just not as visible.)
    Another choice is to use DOM or JDOM to create the Html content using Element objects to create tags. The main advantage of that over doing "
    ...out.println( "<h1>...</h1>);
    is that it makes sure the closing tags match, and empty tags are properly coded.
    In answer to your direct question, there is no standard for how to code data into XML so you can run an XSLT transform to convert it into HTML. It also mixes Java logic and XML in the same file. You need to choose your poison.
    Dave Patterson

  • XML Schema questions

    Question 1:
    If I have a many to many relationship that I want to display within multiple tables.  Is there a straightforward way to bind that?
    An example would be an automobile that use similar parts (seats etc).  I dont think livecycle supports keys
    So the xml looks like
    <orderCatalog>
      <automobile>
         <modelNumber>auto1</modelNumber>
          ... year etc
      </automobile>
      <part>
             <partNo>part1</partNo>
      </part>
       <joinAutoPart>
              <modelNumber>auto1</modelNumber>
              <partNo>part1</partNo>
       </joinAutoPart>
    </orderCatalog>
    I would like to point this to
    Subform pointing to joinAutoPart
    Header field pointing to automobile (with model number and name)
    Table with part information pointing to partNo (with partName and partNo and price)
    That way I would have a table per automobile with all of the individual parts listed
    Question 2:
    Can reader load an xml file over the internet by pressing a button like loadXML?
    Question 3: non xml related
    Is there a way to save a link from a table row to another table row
    Using the above example if I had multiple auto tables with multiple parts.  The user selects a part which I add to an order table.
    I would like to highlight that field showing they have ordered the part and grey out the button.
    However, if they remove the item from their order I would like to add it back without having to search every field in every table to find the part number.

    Thanks again for the response.
    Q1: If I have a join table - given that I have a many - to - many relation with multiple autos and multiple parts
    How do I connect the partNo to the description in the table from the xml
    If I create a table that I want to have
    <orderCatalog>
      <automobile>
         <modelNumber>auto1</modelNumber>
         <modelName>Mustang</modelName>
          ... year etc
      </automobile>
      <part>
             <partNo>part1</partNo>
             <partName>Headrest</partName>
      </part>
       <joinAutoPart>
              <modelNumber>auto1</modelNumber>
              <partNo>part1</partNo>
       </joinAutoPart>
    </orderCatalog>
    Automobile Model #,  Make, ....
    PartNo |  Part Description | Order Button
    I can bind joinAutoPart table to the Automobile header, but how to I convert that to a text Model Name vs a number
    I can join PartNo to the entries of a table, but can I fill the descriptions of each
    I want to do select partdescription, colorOptions, etc from partTable where PartNo = part1 then use those values - using binding or xml syntax
    I can reform the xml from my data to be the following, but this requires a lot of duplicate data and is very error prone to have one part name or number that is one off
    <automobile>
        <partList>
             <part>
                     <partNumber>part1<partNumber>
                     <partName>partName</partName>
             </part>
        </partList>
    </automobile>
    Q2: ok
    Ideally, I would like to have a dropdown box where the user selects say a  model name.  Then it builds a list of tables from an xml file - so there are a few common tables - like t-shirts, coffee cups etc that would show up on every form and the rest are dynamic.
    For ODBC, am I correct in thinking that the link has to be established at the client to the server outside of reader before a connection can be made within reader?
    Q3:  I am doing the add programatically, but if I have a part number from a built xml with many tables - is there a way to identify which table it is coming from?
    I don't on the order form have  | ModelNumber | PartNumber, so I don't have an easy way to reference back. And if I did I would still have to do multiple linear searches.  I assume the performance wouldn't be too bad, but it is not pretty.
    i = 0;
    j=0;
    while(i < (ModelTableForm.count-1))
       if (xyz.resolveNode("foo[" + i + "]").modelNumberField.rawValue == modelNumber)
              j = 0;
             while(j< (abc.resolveNode("bar[" + i + "]").count-1))
                 if(abc.resolveNode("bar[" + i + "]").partNumberField.rawValue == partNo)
                         abc.resolveNode("bar[" + i + "]").addButton.prescence="visible"
       i++;
    I was hoping for an extra field or way to extend the row object I could add referringNode or something to that effect and just say OrderRow.refferingNode.button.presence = "visible"
    I think I found one way to get around this.  I think I can create 0 width colums for indexes to the tables
    That way I could say  xyz.resolveNode("foo[" + modelIndex + "]").abc.resolveNode("bar[" + partIndex + "]")

  • XML/XPath question--how to select a range of elements with XPath?

    Hi there,
    I have an XML DOM in memory. I need to do hold it and issue only parts of it to my client app in "pages". Each page would be a self-contained XML doc, but would be a subset of the original doc. So for instance the first page is top-level elements 1-5. 2nd page would be 6-10 etc. Is this solution best solved with XPath? If not, what's the best way? If so, I have the following question:
    Is there a way to use XPath to select a range of nodes based on position within the document? I know I can do an XPath query that will return a single Node based on position. So for example if I wanted the first node in some XML Book Catalog I could do XPathAPI.selectSingleNode(doc, "/Catalog/Book[position()=1]"); I could wrap the previous call in a loop, replacing the numeric literal each time, but that seems horribly inefficient.
    Any ideas? Thanks much in advance!
    Toby Buckley

    Your question is about marking a range of cells. 99% of the code posted has nothing to do with this. If you want to create a simple table for test purposes then just do:
    JTable table = new JTable(10, 5);
    JScrollPane scrollPane = new JScrollPane( table );
    getContentPane().add( scrollPane );
    In three line of code you have a simple demo program.
    When I leave the mouse button again, these bunch/range of cells shall stay "marked". table.setCellSelectionEnabled( true );
    and I'd like to obtain, say, a vector of a vector containing just those data marked beforeUse the getSelectedRows() and getSelectedColumns() methods for this information. I would suggest you create a Point object to reflect the row/column position and then add the point to an ArrayList.

Maybe you are looking for

  • Question on WCCP and ASA/VPN

    Hello i have this simple scenario. -ASA as an EZVPN server. -WSA in my local lan (inside interface) -remote vpn users connecting to the ASA. When a user connects via VPN to my ASA, and i want to do some web filtering to them using the WSA... How woul

  • Need Images To Open Up From Scrollbar

    Hi all. I am trying to get pictures to pop up in a box when the cursor rolls over one of the thumbnails in a scroll bar i have created. i know it is possible because i have seen it on websites before, but am stuck in an area and don't know how to res

  • Error message when burning discs

    I can't burn a disc from my playlists. I have the newest version of iTunes but I do not have the burn icon at the top of the page. The only way I can initialize a burn is to right-click the playlist and select "burn playlist to disc". The burn begins

  • Oss2jack problem [Solved]

    I recently set up mpd and sonata and it worked, but I wanted to allow multiple programs to play sound so I decided to install oss2jack.  It worked, but then  I rebooted and I get an error when trying to play something.  For example, I type: ogg123 mu

  • Can't change keyboard layout

    I've bought my new Macbook when i traveled to US, though i live in Brazil. I just want my keyboard to have a brazilian layout, with the special characters, and stuff. I've already tried to go to International > Input Menu, and change its configuratio