Access database dynamic query output...

Dear CF Colleagues:
I need to run a loop for 4 times, to access four seperate values out of a data row in a test results table (tbl_results), where all four are in the row of the student (WHERE studentid = etc).
It looks like this...
  <cfset variables.TimeTotals = 0>
  <cfloop from="1" to="4" step="1" index="timrec">
     <cfquery datasource="mydsn" name="rs_time">
      SELECT Btime#timrec#
      FROM tbl_results
      WHERE studentid = 'jack';
     </cfquery>
<cfset variables.TimeTotals = variables.TimeTotals + (????? rs_time.Btime#timrec# value ?????)>
</cfloop>
*** QUESTION: How do I address that Btime#timrec# value? Not in this way, I know, but how?
Looking forward to your wisdom, with gratitude,
Hans

As Reed says, many ways to tackle this.
I would also point out the ability to ready all the BTIme... columns with one query then loop through the columns to total that time.... OR total them in the database.
These both have the advantage of only needing one network connection to the database, which is the slowest part of this process.
A)
<cfquery name rs_time ...>
   SELECT Btime1, Btime2, Btime3 Btime4
</cfquery>
<cfset variable.TimeTotals = 0>
<cfloop list="#rs_time.columnList#" index="col">
     <cfif left(col,5) EQ "BTIME"><cfset variables.TimeTotals = variable.TimeTotals + rs_time[col][1]>
</cfloop>
B)
<cfquery name="rs_time"...>
     SELECT Btime1 + Btime2 + Btime2 + Btime4 AS totalTime
</cfquery>
OF COURSE
I would be remis if I did not point out that you would have a more expandable database design if you normalized this so that the test times where not columns in the tbl_resluts table but rather rows.

Similar Messages

  • How to connect Access database Dynamically

    Hi,
    I want to make connection to Access database with java with dynamically. I know to make connect to database in the following way:
    This way, I go to setting->controlPanel->Administrative tools->ODBC & then i select database & i use following code"
    public void  databaseconnect(){
        try{
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          connection =  DriverManager.getConnection("jdbc:odbc:student");
          output.append("Connection Successful\n");
        catch(ClassNotFoundException cnex){
          cnex.printStackTrace();
          output.append("Connection Unsuccessful\n"+cnex.toString());
        catch(SQLException sqlex){
          sqlex.printStackTrace();
          output.append("Connection unsuccessful\n"+sqlex.toString());
            catch(Exception ex){
              ex.printStackTrace();
              output.append(ex.toString());
    }But now i want to know the way to make connection to database dynamically. How this is possible? I want to make connection to database without selecting database from the Administrative tool? Is there anybody can help me?
    With regards
    Bina

    http://faq.javaranch.com/view?OdbcJdbcQuestions

  • Dynamic query output

    in my asp.net+vb web there is a query as under
    http://sqlfiddle.com/#!3/5fb32/2
    Output is as under
    http://imgur.com/MMJjqws
    There is a table named PL and the structure and data is as under
    ID    PL
    1     HS
    2     SH
    3     SN 
    the data in field PL may change from company to company. That is why i am willing to modify the code above. so that a complete details with a separator for each PL can get in output. sample out put as under.
    http://i.imgur.com/lrYeVnH.jpg
    i had created the fiddle of the table PL also in above link of my code
    if it can be a stored procedure also
    I am a System Administrator at Vadodara

    Make your query like below
    select A.Tank,A.ALI,A.SLI,A.CLI,A.TDI,A.COURSE,A.MHO,A.ATT,A.OSWAL,A.AVIL,A.Present,A.SortOrder,
    (A.ALI+A.SLI+A.CLI+A.TDI+A.COURSE+A.MHO+A.ATT+A.OSWAL+A.AVIL+A.PRESENT) as Held,
    PL
    from (
    SELECT CASE WHEN KDPR<=5 THEN 'OTT' WHEN KDPR>=6 and KDPR<=8 THEN 'JTT' WHEN KDPR>=9 THEN 'ORT' END Tank,
    SUM(CASE Status WHEN 'ALI' THEN 1 ELSE 0 END) AS ALI,
    SUM(CASE Status WHEN 'SLI' THEN 1 ELSE 0 END) AS SLI,
    SUM(CASE Status WHEN 'CLI' THEN 1 ELSE 0 END) AS CLI,
    SUM(CASE Status WHEN 'TDI' THEN 1 ELSE 0 END) AS TDI,
    SUM(CASE Status WHEN 'COURSE' THEN 1 ELSE 0 END) AS COURSE,
    SUM(CASE Status WHEN 'MHO' THEN 1 ELSE 0 END) AS MHO,
    SUM(CASE Status WHEN 'ATT' THEN 1 ELSE 0 END) AS ATT,
    SUM(CASE Status WHEN 'OSWAL' THEN 1 ELSE 0 END) AS OSWAL,
    SUM(CASE Status WHEN 'AVIL' THEN 1 ELSE 0 END) AS AVIL,
    SUM(CASE Status WHEN 'Present' THEN 1 ELSE 0 END) AS Present,
    MAX(CASE WHEN KDPR <= 5 THEN 1 WHEN KDPR >= 6 AND KDPR <= 8 THEN 2 WHEN KDPR >= 9 THEN 3 END) AS SortOrder,
    PL
    FROM STAFF
    GROUP BY CASE WHEN KDPR<=5 THEN 'OTT' WHEN KDPR>=6 and KDPR<=8 THEN 'JTT' WHEN KDPR>=9 THEN 'ORT' END,
    PL
    ) A
    ORDER BY A.SortOrder ASC
    and then use a tool like SQL Reporting services to show data in format you want. For this just add PL as a grouping column within table and then inside the group add the other fields.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Is it Possible to upload the output from Oracle reports To Access database

    Hi All,
    Wish you All a Very Happy New Year.
    I have a query.Is it possible to
    upload the output from the Oracle reports
    to the Access database???
    Any suggestions would be appreciated.
    TIA
    sg

    Hi sg,
    Research the DDE option.
    Dynamic Data Exchange (DDE) is a mechanism by which applications can communicate and exchange data in Windows.
    I have imported data into the excel spreadsheet using DDE built in functions. I am sure it can work with MS Acess as well. If not, then you need to create a 2 step process .. reports -> excel -> access.

  • Access database query resultset in java scriptlet

    Question:
    1) I am Creating a web page and plotting points on the page:
    2) Database query results in decimal values dec_latitude and dec_longiitude.
    3) Perform calculations on lati. & long. in a java scriptlet to create a plot position (xpos, ypos).
    4) Send the xpos and ypos back to the java server page
    5) Use <IMG and absolute positioning to plot the point at position xpos, and ypos.
    6) Repeat until all rows in the query result set have been plotted.
    I don't know how to pass the dec_latitude and dec_longitude to the java scriptlet.
    After the java scriptlet calculation translates the latitude and longitude
    into xpos and ypos, I need to pass the xpos and ypos back to the java server page so that a data point is plotted on a map at position xpos, ypos.
    I tried many ways of doing it but am just guessing as
    to how to pass the data.
    Thanks in Advance. - John
    Here is what I am trying so far .... see snippet below:
    The code below results in a runtime error.
    Am I supposed to create a java object and access that in the java scriptlet? Can the java scriptlet access the latvar and longvar created during the "<c:set var="latvar"... ?
    If not, what mechanisum do I use to access the resulting colums: dec_latitude and dec_longitude? I need the java scriptlet to convert the
    dec_latitude and dec_longitude into a display position based on the number of pixels from the TOP and LEFT (xpos, ypos). Then plot of the data point using the IMG and (xpos, ypos). This will overlay a map whose z-index is lower than the plotted data point.
    *** Query the database ***
    <sql:query var="qryBio">
    SELECT
    DEC_LATITUDE,
    DEC_LONGITUDE,
    ENTRY_TIMESTAMP
    FROM app.biosurvey where
    </sql:query>
    *** for each row retreived from the database ***
    <c:forEach var="row" items="${qryBio.rows}">
    <c:set var="latvar" value="${row.dec_latitude}" scope="page"/>
    <c:set var="longvar" value="${row.dec_longitude} "scope="page" />
    *** java code scriptlet - ***
    *** convert latitude and longitude to xpos and ypos for display ***
    <%
    latitude = (Float)pageContext.getAttribute("latvar"); <--- runtime error !!!!
    longitude = (Float)pageContext.getAttribute("longvar");
    xpos = (int)Math.round(latitude);
    ypos = (int)Math.round(longitude);
    xpos = 1082 - xpos;
    ypos = 700 + ypos;
    pageContext.setAttribute("xpos", xpos);
    pageContext.setAttribute("ypos", ypos);
    %>
    *** plot a point on the display html page overlaying the map ***
    <IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xpos%> px;
    left:<%=ypos%> px;
    z-index:2">
    </c:forEach>

    Thanks
    I still get a runtime error: I translated the code you gave to code below .... which I think is equivalent. See Below: I'm still learning about this stuff so I may not have not translated this properly. Do
    you see what I am doing wrong?
    Best Regards,
    - John
    %@ page language="java" contentType="text/html;
    charset=ISO-8859-1"%>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ page import="java.lang.Math"%>
    <sql:setDataSource dataSource="jdbc/SampleDB" />
    <c:set var="genus_name" value="${param.genus_name}" />
    <c:set var="species_name" value="${param.species_name}" />
    <c:set var="species_common_name" value="${param.species_common_name}" />
    <c:set var="dd_sighted" value="${param.dd_sighted}" />
    <c:set var="mm_sighted" value="${param.mm_sighted}" />
    <c:set var="yyyy_sighted" value="${param.yyyy_sighted}" />
    <c:set var="species_state" value="${param.species_state}" />
    <c:set var="species_county" value="${param.species_county}" />
    <c:set var="species_country" value="${param.species_country}" />
    <c:set var="dec_latitude" value="${param.dec_latitude}" />
    <c:set var="dec_longitude" value="${param.dec_longitude}" />
    <c:set var="notes" value="${param.notes}" />
    <c:set var="person_first_name" value="${param.person_first_name}" />
    <c:set var="person_last_name" value="${param.person_last_name}" />
    <c:set var="person_street" value="${param.person_street}" />
    <c:set var="person_city" value="${param.person_city}" />
    <c:set var="person_state" value="${param.person_state}" />
    <c:set var="person_zip" value="${param.person_zip}" />
    <c:set var="person_country" value="${param.person_country}" />
    <c:set var="person_email" value="${param.person_email}" />
    <h2>Species Sightings:</h2>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Breckenridge Citizen Bio-Survey Selective Output Page</title>
    </head>
    <body>
    Izaak Walton League of America
    <h1>Breckenridge Citizen Bio-Survey Selective Output</h1>
    <HR>
    <c:if test="${param.action == 'Submit'}">
    <%int xpos = 0;
         int ypos = 0;
         float latitude = 0.0F;
         float longitude = 0.0F;
         float latitudeMpls = 45.06F;
         float longitudeMpls = -93.14F;                    int xposMpls = 1205 - (int) Math.round(latitudeMpls);
         int yposMpls = 735 + (int) Math.round(longitudeMpls);
    %>
    <IMG SRC="minnesota_1990.jpg" ALT="minesota map" style="z-index:1;"> <----- THIS WORKS FINE
    <IMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xposMpls%> px;
    left:<%=yposMpls%> px;
    z-index:2"> <----- THIS WORKS FINE FOR HARDCODED MPLS XPOS AND YPOS
    <sql:query var="qryBio">
    SELECT
    PERSON_FIRST_NAME,
    PERSON_LAST_NAME,
    GENUS_NAME,
    SPECIES_NAME,
    SPECIES_COMMON_NAME,
    SPECIES_COUNTY,
    SPECIES_STATE,
    SPECIES_COUNTRY,
    DD_SIGHTED,
    MM_SIGHTED,
    YYYY_SIGHTED,
    DEC_LATITUDE,
    DEC_LONGITUDE,
    NOTES,
    ENTRY_TIMESTAMP
    FROM app.biosurvey where
    genus_name like rtrim(upper('${genus_name}')) AND
    species_name like rtrim(upper('${species_name}')) AND
    species_common_name like rtrim(upper
    ('${species_common_name}')) AND
    species_state like rtrim(upper('${species_state}')) AND
    species_county like rtrim(upper('${species_county}')) AND
    species_country like rtrim(upper('${species_country}')) AND
    person_first_name like rtrim(upper('${person_first_name}')) AND
    person_last_name like rtrim(upper('${person_last_name}')) AND
    person_email like rtrim(upper('${person_email}'))
    </sql:query>
    <c:forEach var="row" items="${qryBio.rows}">
    <--- THE LINE ABOVE WORKS FINE --->
    <c:set var="latvar" value="${row.dec_latitude}" scope="page" />
    <c:set var="longvar" value="${row.dec_longitude} " scope="page" />
    <%
    latitude =
    Float.parseFloat((String)pageContext.getAttribute("latvar"));
    <--- RUNTIME ERROR OCCURS HERE --- SEE LINE ABOVE --->
    longitude =
    Float.parseFloat((String)pageContext.getAttribute("longvar"));
    xpos = (int) Math.round(latitude);
    ypos = (int) Math.round(longitude);
    xpos = 1082 - xpos;
    ypos = 700 + ypos;
    request.setAttribute("xpos",new Integer(xpos));
    request.setAttribute("ypos",new Integer(ypos));
    %>
    IIMG ID="Row" SRC="smallredbox.jpg" ALT="red box"
    STYLE="position:absolute;
    top:<%=xpos%> px;
    left:<%=ypos%> px;
    z-index:2">
    <--- THIS (ABOVE) WORKS FINE WITH CORRECT VALUES FOR XPOS AND YPOS WHEN RUNTIME ERROR DOES NOT OCCUR --->
    </c:forEach>
    </c:if>

  • Access Database Query

    I am running a query on an access database, but am getting some strange results. The problem might be access and not Visual studio though.
    Here is the core of the problem:
    If I run the following query, I get exactly what I want
    SELECT ID, Question, Solved, Date_Created, Date_Last_Edit, Date_Closed
    FROM(
    SELECT F.ID AS Ident, Count(F.ID) AS Num
    FROM(
    SELECT Keywords, ID, Question, Solved, Date_Created, Date_Last_Edit, Date_Closed
    FROM(
    SELECT ID, Solved, Date_Created, Date_Closed, Date_Last_Edit, Question, Model, Keywords.Value AS Y FROM Questions) AS X INNER JOIN Keywords ON X.Y =Keywords.ID
    Where Keywords = "Back" ) As F
    Group By F.ID
    HAVING (((Count(F.ID)) =1)))
    As T Inner Join Questions
    On T.Ident = Questions.ID
    But, if I change
    Where Keywords = "Back"
    to
    Where Keywords Like "*Ba*"
    I get nothing from my query. No errors, just no data.
    The strange thing is, if I output my query to a message box, and copy and paste it into access and run the query, it runs just fine. I've double checked all the syntax and I don't get a syntax error back from the code anyway.

    Hi Mynamewasused,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation
    Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    To help you find the correct forum support this issue, could you please tell me if you running a query on an access database with ADO.NET?
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SQL Query with MS-Access Database

    Hi,
    I have linked my oracle database with MS-Access via a DB LINK. i can access the data from MS-ACCESS, but i have a problem that when i specify the column name or define a where clause in my query it gives me the error ORA-00904: invalid identfier ..
    This query fetch the data without any problem SELECT * FROM TBLREPORT@M_ACCESS but when i run SELECT EMP_ID FROM TBLREPORT@M_ACCESS it gives me the error i mentioned above. (Column name have No problem or mistake of spelling even CASE)
    also when i try to put where clause in the query it gives me same error SELECT * FROM TBLREPORT@M_ACCESS WHERE EMP_ID = '100' (Error)
    is there any change in SQL query for ACCESS database ??
    any clue
    Regards
    Rehman

    Are column/table names in access case sensitive? Issue
    DESC TBLREPORT@M_ACCESS If column EMP_ID actual name shows up in mixed/lower case, enclose it in double quotes and use the exact case. E.g., if column name shows up as Emp_Id, use:
    SELECT "Emp_Id" FROM TBLREPORT@M_ACCESSSY.

  • How to insert date into ms access database using sql query in servlet

    sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
    insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
    or either the system date is inserted with query .
      plz help me
    thanx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    bhavishya wrote:
    sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
    insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
    or either the system date is inserted with query .
    plz help me
    thanxAnd that SQL statement is another reason to use PreparedStatement. I assume bname and sname are input from some form? Well, if that's the case, simply inserting them into SQL by simple String concatenation is just begging for all sorts of problems. What if there is an apostrophe in the entry? Broken Statement. Worse, it's a wide open invitation to an SQL Injection attack.

  • Access database query import

    I have some queries stored in databases from MS Access which I am trying to import into DIAdem.  I use the open with option for the database to select the query I wish to load and then chose selective opening to grab the columns of data I really want.  It appears to import the data but only the first 27890 entries - the total is approx 750,000.  Why is only about 27890 entries being imported?

    Hi Jim,
    No, I am not sure why you are experiencing this difference in load behavior.  We tried to replicate your situation here and were able to successfully load either by selecting the whole table or specific columns within that table:
    ACCESS Table with 7 columns, each column with 560 000 values
    Tested on both a DIAdem 9.1 SP2c computer and a DIAdem 10.1 SP1 computer (clean installs)
    Result in DIAdem:
    7 channels, each channel with 560 000 values if I load the table complete
    3 channels, each channel with 560 000 values if I load selected channels
    The first step is for us to reproduce your symptoms.  Would it be possible for you to post your Access database on our ftp.ni.com/incoming server?
    How much RAM do you have on your computer?
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Linking to an Access Database (accdb) - calculated field in query

    Using Crystal Report v 14 we have a problem linking to an Access 2010 database (accdb file format).
    We created a query in the Access database with a calculated field that we want to use to link with Great Pllains database. We can see the query using the database expert and the OLEDB (ADO) data source. The problem is that the calculated field in the Access query does not show in the link manager.
    What is the best wat to link an Access table that has a job number containing hyphens (111-222-333) with the other database that has the job number stored without hyphens (111222333)? Why does our query solution not work?

    Hi,
    I'm not sure if this can be handled at the Database query level, however this can surely be handled from the report level.
    You would need to insert a subreport with Great Pllains as its datasource. The Main report's data source would be the access table.
    Next, in the Main report you would need to create a formula to remove the hyphens from the string and convert it back to number. Use this formula:
    tonumber(replace(,"-",""));
    You can then palce this formula in the details section/group section (which ever is applicable) and then link the subreports's job number field with this formula field. A record selection formula is automatically added in the subreport when you do so.
    Also, make sure the sub-report is place in the same section this formula field is placed in, otherwise you can get unexpected results.
    Hope this helps!
    -Abhilash

  • "RUN-TIME ERROR '3078': The Microsoft Access database engine cannot find the input table or query 'name'. Make sure it exists and that its name is spelled correctly.

     When I run the code below I get the following error:"RUN-TIME ERROR '3078': The Microsoft Access database engine cannot find the input table or query 'False'. Make sure it exists and that its name is spelled correctly. Note that I do not call
    anything by the name of "false" anywhere in this code.
    The subject code (the underscored line of code is highlighted in the debugger when the error occurs):
    Option Compare Database
    Private Sub JobAssign_Click()
    MatLotListAvail_openform
    End Sub
    Function MatLotListAvail_openform()
    Dim dbsAPIShopManager2010 As DAO.Database
    Dim rstMaterialLotJobJoint As DAO.Recordset
    Dim strSQL As String
    Set dbsAPIShopManager2010 = CurrentDb
    strSQL = "SELECT * FROM MaterialLotJobJoint WHERE JobID" = "tempvars!JobID" And "MatLotID" = "tempvars!MatLotID"
    Set rstMaterialLotJobJoint = dbsAPIShopManager2010.OpenRecordset(strSQL, dbOpenDynaset)
    If rstMaterialLotJobJoint.EOF Then
    DoCmd.OpenForm "JobAssignMatConf", acNormal, "", "", acEdit, acNormal
    Forms!JobAssignMatConf!PartapiIDVH = TempVars!PartapiID
    Forms!JobAssignMatConf!JobapiIDVH = TempVars!JobapiID
    Forms!JobAssignMatConf!JobIDVH = TempVars!JobID
    Forms!JobAssignMatConf!MaterialLotIDVH = TempVars!MatLotID
    Forms!JobAssignMatConf!Desc = TempVars!MatDesc
    Forms!JobAssignMatConf!recdate = TempVars!recdate
    DoCmd.Close acForm, "MaterialLotListAvailable"
    Else: MsgBox "This material lot has already been assigned to this job."
    DoCmd.Close acForm, "MaterialLotListAvailable"
    End If
    End Function

    I think the SQL statement should be
    strSQL = "SELECT * FROM MaterialLotJobJoint WHERE JobID=" & _
    tempvars!JobID & " AND MatLotID=" & tempvars!MatLotID
    This assumes thatJobID and MatLotID are number fields.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Problems with Dynamical SQL Querys on Access Databases!

    This thread is for everyone who has the same problems like me.
    I tried to change SQL-Querys via Javascript to fill in my PDF sheet some data from my database.
    But whenever I want to change the Query, I never get some data back.
    The main problem was:
    THE ACCESS DATABASE
    Access has locked the database whenever I tried to run the Query.
    Now Iam using MySQL and everything is working fine.

    This thread is for everyone who has the same problems like me.
    I tried to change SQL-Querys via Javascript to fill in my PDF sheet some data from my database.
    But whenever I want to change the Query, I never get some data back.
    The main problem was:
    THE ACCESS DATABASE
    Access has locked the database whenever I tried to run the Query.
    Now Iam using MySQL and everything is working fine.

  • Dynamic Drop Down Menu from an Access Database

    Hello Everyone,
    I am user Adobe Designer 7 to create a fillable PDF, and I would like to get the options for a drop down menu from my MS Access database. Basically I would like to populate the drop down menu with the names in the Access database. There i Have a table called PhoneNumbers and it contains the names of all the people I want to appear in the drop down menu that I just created.
    This is what I did:
    I created a drop down menu and then I clicked on Object > Binding > under "Default Binding (Open, Save, Submit)" choose "New Data Connection"
    then connect to the database using a fileDSN. I opened the table where with the "names" column (PhoneNumbers)
    and under the "Query," option, I wrote:
    select * from PhoneNumbers
    Then it gave me all the fields from the table and I dragged the "Last name" field over the drop down menu. I will need to find a way to get the "First Name" field to join the Last Name field to create one name that looks like this: Hill, Angie
    The problem is that even though it shows the name from the Access database, it does not give me a list of all the names when I open the form in Reader 7...
    No matter how much I click that drop down arrow, the name does not change...
    It's almost as if it gets to the databse and gets the data from the database, but it cannot loop through it...
    It's almost as if it's missing the code to loop through it...
    Why is this? Any ideas how to fix it so it gives me a list of ALL the names, when I click on the drop down button?
    After that, how can I add the first name to it?
    The form would look like this:
    Angie H. 202 641 2055
    Right now it does look like that, but I cannot change to another name when I click the drop down menu. For the code to be working when I change to another name, the phone number also changes to the phone number of that person:
    Barry S. 703 555 1258
    The name is in a drop down menu, the phone number is in a textbox.
    Can you help me with this?

    ANGELA,<br /><br />Well, the good new is that you are not far off...What you need is to insert the following code using Java Script under the Initialize function.  Just replace the Connection name,  The Hidden Value, and the Display Text with your information.  This is a function is 8.0 but will work with 7.0<br /><br />/*     This dropdown list object will populate two columns with data from a data connection.<br /><br />     sDataConnectionName - name of the data connection to get the data from.  Note the data connection will appear in the Data View.<br />     sColHiddenValue      - this is the hidden value column of the dropdown.  Specify the table column name used for populating.<br />     sColDisplayText          - this is the display text column of the dropdown.  Specify the table column name used for populating.<br /><br />     These variables must be assigned for this script to run correctly.  Replace <value> with the correct value.<br />*/     <br /><br />var sDataConnectionName = "DataConnection";     //     example - var sDataConnectionName = "MyDataConnection";<br />var sColHiddenValue = "CAT_Corp_SeqNo";               //     example - var sColHiddenValue = "MyIndexValue";<br />var sColDisplayText = "CAT_Corporate";               //     example - var sColDisplayText = "MyDescription"<br /><br />//     Search for sourceSet node which matchs the DataConnection name<br />var nIndex = 0;<br />while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br /><br />var oDB = xfa.sourceSet.nodes.item(nIndex);<br />oDB.open();<br />oDB.first();<br /><br />//     Search node with the class name "command"<br />var nDBIndex = 0;<br />while(oDB.nodes.item(nDBIndex).className != "command")<br />     {<br />          nDBIndex++;<br />     }<br /><br />//     Backup the original settings before assigning BOF and EOF to stay<br />var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");<br />var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");<br /><br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF", "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF", "eofAction");<br /><br />//     Clear the list<br />this.clearItems();<br /><br />//     Search for the record node with the matching Data Connection name<br />nIndex = 0;<br />while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br />var oRecord = xfa.record.nodes.item(nIndex);<br /><br />//     Find the value node<br />var oValueNode = null;<br />var oTextNode = null;<br />for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)<br />     {<br />          if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)<br />          {<br />               oValueNode = oRecord.nodes.item(nColIndex);<br />          }<br />          else if(oRecord.nodes.item(nColIndex).name == sColDisplayText)<br />     {<br />          oTextNode = oRecord.nodes.item(nColIndex);<br />     }<br />}<br /><br />while(!oDB.isEOF())<br />{<br />      this.addItem(oTextNode.value, oValueNode.value);<br />       oDB.next();<br />}<br /><br />//     Restore the original settings<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup, "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup, "eofAction");<br /><br />//     Close connection<br />oDB.close();

  • SQL query to find access database files?

    Odd request, but does anyone have a SQL query to find files? Specifically, I am looking for machines that have access databases on them. .mdb & .accdb

    Have you enabled inventory for them?
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ
    i was trying to figure out where that option was but couldn't find it under hierarchy settings. perhaps it's been changed since 2012 R2? can you help point it out?

  • Accessing data from mutiple databases dynamically in OBIEE

    Hi,
    Can we access a database column by having its name as a string? Actually i want to connect to multiple databases based on some condition dynamically. I do not want to hard code database columns in the condition i want to read them from configuration table. How can we do it in OBIEE?
    The problem i am facing is that i can read a value from the configuration table but the OBIEE treats it as a string not as a column source. so can i access database column by this giving the column name as a string.
    Thanks.
    Aasim

    Check out this post and the links to Venkat and John that it contains:
    http://siebel-essentials.blogspot.com/2009/03/more-dynamics-in-obi-ee-physical-layer.html

Maybe you are looking for

  • Laptop turns on but has a folder with a question mark in the middle

    for the last month or so my computer has been acting weird. when i turnd it on one morning it wouldent load it just kept the apple sign logo on the screen then it would change too the circle with a line though it sign. now the logo doesnt even show u

  • No Entry in Table T510 when the entry should be pointing to T710?

    Hello Guruu2019s, When we process an IT0008 change, we are receiving an error that there is u201CNo Entry in Table T510 for the key 10*###** **** on 2/20/2011u201D.  This is a new entry in PM Compensation Management Job pricing  Pay Structures  D

  • Plan actual consumption report

    Dear All, The client want to see a report where the planned consumption of quantity mentioned in the BOM and the actula consumption at conformation along with the standard price of sfg. he wants to get the difference per unit of standard& actual. thi

  • Upgrade from 10.2.0.2to 10.2.0.4.0

    HI, I want upgrade DB 10.2.0.5 from 10.2.0.2 Linux t, can any one let me know the patch number, Thanks

  • N97 mini contacts?

    How do i copy my contacts from my sim card to my phone? or how do i look at my contacts from sim card so i can dial to them?