Using databases and container events?

I'm having trouble finding documents show how one should use databases and listen for container events? I'm using Berkley Java DB. I'll need all my remote object to have access to the database. How do I pass that in? Custom adapters? Also, when Tomcat shuts down I need to close the database, how would this be down? Custom adapters? So I may be answering my own question, but I'm asking cause I really don't see anything in the documentation that points this out. It really looks like I'd be using singletons and factories for this. I could register a Servlet or Servlet Context to listen for Tomcat events, but I figured it couldn't hurt to ask others using Blaze, as I'm very new to it. Thanks.

So how would you tell Blaze to use this? Is there something you put into the config file? My thoughts on all this is to use PicoContainer to manage all services then create an adapter to inject all resources when creating remote objects. But this seems a little heavy if Blaze can do all this for me. The adapter seems like the injection point to me. Is that not what it's used for? Or is using it like that bad practice under Blaze? I've read all I can find on Blaze, so either it's missing docs, or I'm not finding them all. If I'm missing them, by all means let me know where to go. I don't want to ask questions that are already answered in documents else where.
On Tue, May 20, 2008 at 10:51 AM, Mete Atamel <
[email protected]> wrote:
A new message was posted by Mete Atamel in
General Discussion --
  Using databases and container events?
I think it's mainly in JavaDocs but here's a sample I have where I check to make sure the HSQLDB is running as the BlazeDS starts up:
import java.sql.Connection;
import java.sql.SQLException;
import flex.messaging.config.ConfigMap;
import flex.messaging.services.AbstractBootstrapService;
public class DatabaseCheckService extends AbstractBootstrapService
    // This is called right before server starts up.
    public void initialize(String id, ConfigMap properties)
        Connection c = null;
        try
            // Check that the database is running...
            c = ConnectionHelper.getConnection();
            // ... if yes return
            return;
        catch (SQLException e)
            System.out.println("DB is not running!");
        finally
            ConnectionHelper.close(c);
// This is called as server is starting.
    public void start()
        // No-op
// This is called as server is stopping.
    public void stop()
        // No-op
View/reply at
Using databases and container events?
Replies by email are OK.
Use the
unsubscribe form to cancel your email subscription.
"All that is necessary for the triumph of evil is that good men do nothing." - Edmund Burke

Similar Messages

  • [svn:cairngorm3:] 16673: Removed selectors and [ManagedEvents] tags, We are now using dispatchers and explicit event types to handle commands

    Revision: 16673
    Revision: 16673
    Author:   [email protected]
    Date:     2010-06-25 09:43:24 -0700 (Fri, 25 Jun 2010)
    Log Message:
    Removed selectors and tags, We are now using dispatchers and explicit event types to handle commands
    Modified Paths:
        cairngorm3/trunk/samples/insync/insync-basic/src/InsyncContext.mxml
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RefreshSearchAfterSav eController.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RemoveContactCommand. as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RemoveContactIntercep tor.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/SaveContactCommand.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/SearchEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactFormPM.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactsListPM.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ContactsNavigatorPM. as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/presentation/ToolbarPM.as
        cairngorm3/trunk/samples/insync/insync-basic/test/insync/application/RefreshSearchAfterSa veControllerTest.as
        cairngorm3/trunk/samples/insync/insync-basic/test/insync/application/RemoveContactCommand Test.as
        cairngorm3/trunk/samples/insync/insync-basic/test/insync/application/SaveContactCommandTe st.as
    Added Paths:
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/AddContactEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/EditContactEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/RemoveContactEvent.as
        cairngorm3/trunk/samples/insync/insync-basic/src/insync/application/SaveContactEvent.as

    bleach wrote:
    i see these
    URxvt*background: #171717
    URxvt*foreground: #B2B2B2
    URxvt*color0: #171717
    URxvt*color1: #3D3D3D
    URxvt*color2: #ffffff
    are not commented out
    3d3d3d is for red but you have a blackish and color2 is for green but you have it white the rest should be the default colors. it uses the same colors only it changes the vairiant of the color you choice there or normally moc uses colors such as green blue and such which will call your console colors for those respective fields I know moc has /user/share/moc/themes/ that you can edit or make your own for instance copy one and edit it. I think htop uses the same color count which is 8 but with so green will be white when you use urxvt. 8 for normal colors 16 for bright dark and urxvt is 256 which is 16 but can use any of the 256 colors for 16.
    just to clarify you have commented out your colors 4-15 and your green and red is weird, and htop aswell as moc is 8 bit. moc theme_yellow_red is default for background so it will use urxvts background
    Haahaha, that is simple. And it works!!!
    I didn't bother with commenting that because i thought they are not applied. Anyway, thanks man. My urxvt terminal si grateful to you and your thorough explanation. SOLVED!

  • Using database and file results in search collection

    I have a document management application that contains data
    about PDF documents in a database with a reference to the file name
    to access the PDF, like:
    id Name Number URL
    1 Doc Title 1 100-199 100-199.pdf
    2 Doc Title 2 100-287 100-287.pdf
    We currently search on the name and number from the database,
    but users want to search the contents of the PDF as well. The name
    and number are inside the PDF, but there is no metadata to return
    clean search results.
    Is there a way to combine the database query collection with
    the file search collection to create a single, searchable
    collection without manipulating the PDF files?
    Tags: cfsearch, cfcollection, cfindex, verity

    Hi,
    I'd like to do this also, is this possible?

  • My First Days in Life and work events

    Hi All,
    I want to implement the My First Days alone in the Life and work events for other countries. I found some notes and docs saying how to adopt the entire LWE for other countries. But i need My first days alone. Is it possible to do so?
    Regards,
    Vijay

    In continuation of my question...
    In order to use Life and Work Events application (For Non US)..
    I updated the process template id in resource definition in SPRO transaction.
    Earlier it was :
    URL Parameter : process.template.id=CECE64A19C8F11DAA5C1000E7FA67AEB&process.autostart=true (for US)
    now I have changed it to
    URL Parameter : process.template.id=CE140F51C11711D9824C000BCD45EE55&process.autostart=true (for non US)
    So now I guess I am actually picking up non US application..
    But now when I try to access application :
    Personal Data in My first days
    Family/member dependent
    I am getting below error :
    The following ABAP Exception occurred: SERVICEKEY_INVALID:
    caused by
    Caused by: com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFC_Fault_Exception: Fault name: SERVICEKEY_INVALID, fault text: SERVICEKEY_INVALID
    I do not even know whether i should revert back to old process template id for US country

  • Trouble with Search using MSSQLFT and Like

    I am using SPServices to run a search on a scope I have defined. When the page first loads, I run a query that retrieves all the items from the search scope using
    var queryExtra = '';
    var q = "SELECT Title,Path,Description,Write,Rank,Size,SiteTitle FROM SCOPE() WHERE ";
    q += queryExtra + " (\"SCOPE\"='LC Engagement Sites') ORDER BY Rank";
    var queryText = makeQuery(q);
    $().SPServices({
    operation: "Query",
    queryXml: queryText,
    completefunc: function(xData, Status) {
    The function makeQuery turns the sql into the required xml.  When run, this works.
    I also have a textbox that allows the user to show only ones where the title contains some text.  I have tried using like and contains to restrict the search but both return no results.
    var queryExtra = getAll || title == "" ? "" : " Title like '%" + title + "%' AND ";
    var queryExtra = getAll || title == "" ? "" : " CONTAINS(title,'" + title + "') and ";
    The query ends up looking like this
    SELECT Title,Path,Description,Write,Rank,Size,SiteTitle FROM SCOPE() WHERE  CONTAINS(title,'taiwan') and  ("SCOPE"='LC Engagement Sites') ORDER BY Rank
    or 
    SELECT Title,Path,Description,Write,Rank,Size,SiteTitle FROM SCOPE() WHERE  title LIKE '%taiwan%' and  ("SCOPE"='LC Engagement Sites') ORDER BY Rank
    and the query packet looks like this
    <QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>
    <Query>
    <Context>
    <QueryText language='en-US' type='MSSQLFT'><!
    [CDATA[SELECT Title, Path, Description, Write, Rank, Size, SiteTitle
    FROM SCOPE()
    WHERE CONTAINS(title,'taiwan') and
    ("SCOPE"='LC Engagement Sites') ORDER BY Rank
    ]]>
    </QueryText>
    </Context>
    <IncludeSpecialTermResults>
    true
    </IncludeSpecialTermResults>
    <Range>
    <Count>1000</Count>
    </Range>
    </Query>
    </QueryPacket>
    Is there something I'm doing wrong? I've seen many examples that show that this is possible but so far no luck.

    Hi,
    The following code for your reference:
    <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta name="WebPartPageExpansion" content="full" />
    <script language="javascript" src="jquery-1.8.2.min.js"></script>
    <script language="javascript" src="jquery.SPServices-0.7.2.min.js"></script>
    <script language="javascript">
    (function () {
    function querySearchService(scopeName, keywordToSearch, maxItemCount) {
    keywordToSearch = keywordToSearch.trim().replace(/\s+/g, "+");
    var queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>"
    queryText += "<Query>"
    queryText += "<Range><StartAt>1</StartAt><Count>" + maxItemCount + "</Count></Range>"
    queryText += "<Context>"
    queryText += "<QueryText language='en-US' type='MSSQLFT'>"
    queryText += "SELECT Title,Path,Description,Write,Rank,Size,SiteTitle FROM scope() WHERE CONTAINS ('" + keywordToSearch + "') AND \"scope\"='" + scopeName + "' AND ISDOCUMENT=true ORDER BY Rank DESC"
    queryText += "</QueryText>"
    queryText += "</Context>"
    queryText += "</Query>"
    queryText += "<EnableStemming>True</EnableStemming>"
    queryText += "<TrimDuplicates>True</TrimDuplicates>"
    queryText += "</QueryPacket>";
    //alert(queryText);
    $().SPServices({
    operation: "Query",
    queryXml: queryText,
    completefunc: function (xData, Status) {
    $(xData.responseXML).find("QueryResult").each(function () {
    var array = new Array();
    alert($(this).text());
    var result = $.parseXML($(this).text());
    var matches = result.find("Document");
    if (matches.length == 0) {
    alert("Nothing Found!");
    return;
    $("#dynamic-search-results").empty();
    matches.each(function () {
    url = $("Properties>Property:nth-child(2)>Value", $(this)).text();
    title = $("Properties>Property:nth-child(1)>Value", $(this)).text();
    $("#resultDiv").append($("<p></p>").append($("<a></a>").prop("href", url).text(title)));
    $(document).ready(function () {
    querySearchService("LC Engagement Sites", "SharePoint", 10);
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled 2</title>
    </head>
    <body>
    <div id="resultDiv"></div>
    </body>
    </html>
    More information is here:
    http://jeffywang.blogspot.com/2014/01/utilizing-spservices-to-call-sharepoint.html
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • Issues with Export/Import using Database & Shared buffer

    Hi All,
    I have a method that calls a program via a job and I am having issues passing data between the two.
    Note that two different users process the method and program (via job) resp. This is how I am calling the second prog-
    SUBMIT ZPROGRAM
                 VIA JOB     l_jobname
                     NUMBER  l_jobcount
                     USER    i_user
                 AND RETURN.
    I need to pass data from method to  the second program and vice versa and then the method continues its processing with the data acquired from the second program.
    I have tried using Import/Export using database and also shared buffer. What I have found is that most of the times I am able to pass data from method to program. However the job takes a couple of min to execute and I think that the data is not making back to the method in time.
    I have looked at some useful forum links-
    Problem with export/import in back ground
    Re: EXPORT/IMPORT  to MEMORY
    but havent been able to find an answer yet. Any solution? Thanks in advance for your help!
    Liz

    Hi Suhas, Subhankar
    I have tested the scenario without the job previously itself and it works. Thats the reason, i am trying with the job now as my requirement is that I need to change the user while executing the second report.
    Here is an example of my import/export - I am passing the return value from the second report to the first.
    Code in second report-
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'RET1'.
    INDX-AEDAT = SY-DATUM.
    INDX-USERA = SY-UNAME.
    EXPORT RETURN1 TO SHARED BUFFER INDX(ST) ID INDXKEY.
    Code in first report -
    SUBMIT ZPROGRAM
                     VIA JOB     l_jobname
                         NUMBER  l_jobcount
                         USER    i_user
                     AND RETURN.
    Once Job close FM is executed successfully, I import the values as follows
    IMPORT RETURN1 TO RETURN1 FROM SHARED BUFFER INDX(ST) ID INDXKEY3.
    INDXKEY is having value RET1.
    However Return1 is not having any values in first report. It has some value in executed without the job
    Please note that I have tried Export/import with Database too and I am getting the same results.
    Thanks for your suggestions.
    Regards, Liz

  • How to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.

    how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.  thanks

    INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
       SELECT col1, col2, col3, ...
       FROM   sourcedb.dbo.tbl
    Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Can I use classes and methods for a maintenance view events?

    Hello experts,
    Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!

    Hi viraylab,
    1. The architecture provided by maintenance view
       for using EVENTS and our own code inside it -
       It is provided using FORM/PERFORM
       concept only.
    2. At this stage,we cannot use classes.
    3. However, inside the FORM routine,
       we can write what ever we want.
       We can aswell use any abap code, including
       classes and methods.
      (But this classes and methods won't have any
       effect on the EVENT provided by maintenance view)
    regards,
    amit m.

  • I m using ms access as database and i want to create a login page in java

    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Login extends JFrame
    //Component Declarations
    JLabel jlb1,jlb2;
         JTextField jtf1;
         JPasswordField jpf1;
         JButton jb1,jb2;
         //Constructor
         Login()
         //frame settings
              setTitle("Login Dialog");
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
              setBounds(d.width/2-175,d.height/2-100,350,200);
              gbc.insets=new Insets(7,7,7,7);
         //adding components
              jlb1=new JLabel("User ID");
              gbc.gridx=0;
              gbc.gridy=0;
              add(jlb1,gbc);
              jlb2=new JLabel("Password");
              gbc.gridx=0;
              gbc.gridy=1;
              add(jlb2,gbc);
              jtf1=new JTextField(10);
              gbc.gridx=1;
              gbc.gridy=0;
              add(jtf1,gbc);
              jpf1=new JPasswordField(10);
              gbc.gridx=1;
              gbc.gridy=1;
              add(jpf1,gbc);
              jb1=new JButton("Login");
              gbc.gridx=0;
              gbc.gridy=2;
              add(jb1,gbc);
              jb1.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                   Connection conn=null;
                        Statement stmt=null;
                        boolean found=false;
                   try
                             Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
                             String dataSourceName = "Inventory";
                             String dbURL = "jdbc:odbc:" + dataSourceName;
                             conn=DriverManager.getConnection(dbURL, "","");
                             stmt=conn.createStatement();
                             ResultSet rst=stmt.executeQuery("Select * from User");
                             System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
                             while(rst.next())
                                  System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
              if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
                                       found=true;
                                       rst.close();
                                       dispose();
                                       MainWindow mw= new MainWindow();     /*created min window object created to be opend after login but not working*/     
                                       break;
                             rst.close();
                             stmt.close();
                             conn.close();                    
                        catch(ClassNotFoundException e){System.out.print(e);}
                        catch(Exception e){System.out.print(e);}
                        if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
                             JOptionPane.showMessageDialog(null,"Invalid username or password",
                                  "Error Message",JOptionPane.ERROR_MESSAGE);
              jb2=new JButton("Clear");
              gbc.gridx=1;
              gbc.gridy=2;
              add(jb2,gbc);
              jb2.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        jtf1.setText("");
                        jpf1.setText("");
                        jtf1.requestFocus();
              setSize(350,200);
              setVisible(true);
              jtf1.requestFocus();
         public static void main(String args[])
    Login l=new Login();
    }

    http://forums.oracle.com/forums/ann.jspa?annID=599
    Oh, and by the way, your keyboard seems to be broken as your words are not getting spelled correctly.

  • How to use training and event functionality in  ESS  BP  in  ep 7.0   ?

    Hi all,
            We are using 
    1). sap portal 7.0  sp 9  and
    2). Using back end  ECC 6.0    
    3).  And using  Ess business package 
    Business Package for Employee Self-Service (mySAP ERP)   release 1.0
      The business package doesnot contain any  training and events module iviews.
    We want to use training and event management iviews on the portal.
    The document for this business package says that  to use  training and event management iviews  we should install   Sap  Learning solutions 
    I want to know?
    1.  How can we use training and event management iviews without  using Learning solutions?
    2. What is actually Learning solutions is  a seperate module  or it is the part of  Sap HR module?
    Please guide me..
    Rajendra.

    Rajendra,
    Have a look at SAP Note 870126.
    Here is a snippet:
    <i>The following international ESS applications based on Standalone ITS have been or will be converted to the integrated ITS Version 6.40, and can still be used with mySAP ERP 2005. You can integrate these applications using ESS Homepage Customizing if required:
    International ESS Services available on the integrated ITS as of mySAP ERP2005:
    Training Center (PV7I) (see Note 771196)
    myBookings (PV8I) (see Note 771196)</i>
    To answer the second part of your question, the Learning Solution is an optional component that can be deployed in ERP.  It complements and extends the existing TEM module.  You generally still use TEM with LSO.
    Is that what you were after?
    Regards,
    John

  • How to retrieve data using logical database and custom select options

    Hi all,
    I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
    Thanks in advance.

    Hai Gupta
    Check the following Document & Links
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB
    good info about Logical Database. you can check the link.
    http://www.geekinterview.com/question_details/1506
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Re: How to Create and Use ldb in reports?
    Re: Logical databases
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Functions for displaying and changing logical databases:
    Call Transaction SE36 or
    Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
    Interaction between database program and report:
    During program processing, subroutines are performed in the database program and events are executed in the report.
    To read data from a database tables we use logical database.
    A logical database provides read-only access to a group of related tables to an ABAP/4 program.
    advantages:-
    The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
    i)An easy-to-use standard user interface.
    ii)check functions which check that user input is complete,correct,and plausible.
    iii)meaningful data selection.
    iv)central authorization checks for database accesses.
    v)good read access performance while retaining the hierarchical data view determined by the application logic.
    disadvantages:-
    i)If you donot specify a logical database in the program attributes,the GET events never occur.
    ii)There is no ENDGET command,so the code block associated with an event ends with the next event
    statement (such as another GET or an END-OF-SELECTION).
    1. transaction code SLDB.
    2.enter name z<ldb-name>
    3.create
    4.short text
    5.create
    6. name of root node (here Ekko)
    7. enter short text (f6)
    8.node type -> data base table.
    9.create
    10 change logical DB
    riht click on ekko and insert node
    here node name ekpo
    11.create
    12. click on selections
    13. press no Should the changed structure of Z<ldb name> be saved first.
    14.select tables which you want to join.
    15.transfer
    16 now you have to o to coding part.
    17. save
    activate.
    19.click to src code
    double click on first include and activate
    Regards
    Sreeni

  • Can i use "begin" and "end" in a database control

    hi there
    i just want to know if i can use begin and end with several sql update statments in between in a database control. u see, i need to run few update statements together. i don't want to put them in seperate method. i was wondering if i could put them together in on method and run it. is there any other way to do it if begin and end are not allowed. thanks

    I have a J2EE application, for which I have a module which is used by system administrators. this module is completly written in Java swing.
    and it does talk to my EJBs.
    If you don't have a firewall in your application, then you can directly make your applications in awt, swing and applets talk to EJBs. if you do have a firewall, then just write a web-service wrapper over your EJBs and other J2EE components and use them from desktop applications.
    It seems that you want to implement a kind of a applet based monitor application for your J2EE EJBs on the server. Applets cannot directly monitor your EJBs.
    Create a new module which has a service which acts as an event listener on the server. each j2ee component on the server notify it if there is a change to them. this service, can then write the data realted to the modification on a socket which is continiously being read by the applet. So you can implement a kind of a monitor for J2ee apps with applets.
    hope this helps.
    regards,
    Abhishek.
    PS:How did you manage to adore the AWT ;-) ? I found that it sucks (good performance.. very poor lnf) ... java swing sucks too (very poor performance ... avaerage lnf).

  • Using databases with Flash and PHP

    Hi, everyone!
    I`m a PHP newbie. I just learned PHP so that I can use
    databases with Flash.
    I`ve got a .php script that contains html that loads up my
    .swf file. The .swf file is the core of my site. What I want to
    know is if I can call some PHP functions (that I have wrote in the
    .php script) from within the .swf file... This functions would
    perform the reading and updating of my database.
    The only way I know of to modify a database from Flash is
    using the POST and GET methods. But that opens up a new browser
    window in which the PHP script is called. And that only handles
    writing in the database. So, what if I just want to read from the
    database some values and insert them into a TextField in Flash? How
    do I do that?
    Thanks! Ardy

    1. Goggle "Flash and mySQL" and you'll get a listing of alot
    tutorials
    2. I'm also just learning. Here's a great URL to start:
    Building with Flash and MySQL
    That's right, a Flash-based blog — it sounds a little
    loony, but this blog pulls content from a MySQL database and feeds
    it into the dynamic Flash frontend ...
    www.webmonkey.com/programming/php/tutorials/tutorial2.html -
    20k - Cached -

  • When I sync my iPod to my MacBook through iTunes new events do not show up and old events are not deleted. I am using Snow Leopard  and not iSync.

    I am using Snow Leopard on a MacBook. I have an iPod touch 3G. I do not use iSync it Mobile Me. When I sync my iPod through iTunes new events on my iPod do not show up on my Mac and old events do not delete. I have read help instructions that include deleting the data on the iPod. The iPod has the correct data and the Mac does not so I have not followed those instructions. I need help as the only reason I bought the Mac was to be able to sync, back up, view and print my calendar. Currently it is useless. If only Apple could have learned from the elegance of the Palm software.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • Problem with Join Queries using PHP and an Orcale Database

    Ok, I am trying to build a simple php querying tool for my oracle database and for the most part it is working however I am having a problem getting data from my join queries. If I run the following query :
    QUERY:
    SELECT lastfirst,EnteredBy,Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    Lastfirst     EnteredBy     Debit
    caiu, test      204     1
    But when I run the query correctly I get no results
    QUERY:
    SELECT sts.lastfirst,gl.EnteredBy,gl.Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    sts.lastfirst     gl.EnteredBy     gl.Debit
    and if I run the query combining the two above methods and adding a field (schoolid) that has the same name on both table I get the following result sets
    QUERY:
    SELECT lastfirst,EnteredBy,Debit,sts.schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    lastfirst     EnteredBy     Debit     sts.schoolid
    caiu, test      204     1     
    QUERY:
    SELECT lastfirst,EnteredBy,Debit,schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    NONE
    Therefore, I have to have something written incorrectly in my php code and I just can not figure it out. My entire code is pasted below please provide me with an assistance you might have to offer. I have change the odbc_connec line so I could post it to this forum. In addition, I had to phrase out the column headers there for when you write the column headers you have to use ~ instead of , as the separator and then I turn back into the correct format for sql.
    //These scripts just open help windows if somone clicks on the icon
    <script>
    function submit()
    {document.sqlform.submit();}
    </script>
    <script>
    function colwin(){
    window.open("colnames.php",null,"height=300,width=400,scrollbars=1");}
    </script>
    <script>
    function tabwin(){
    window.open("tablenames.php",null,"height=300,width=400,scrollbars=1");}
    </script>
    <script>
    function help(){
    window.open("http://www.w3schools.com/sql/default.asp",null,"height=500,width=700,scrollbars=1");}
    </script>
    <form method="post" action="<?php echo $PHP_SELF;?>" name="sqlform">
    <?php
    //Cookie to check for authorization to the site
    if($_COOKIE['cookie']=="CheckCookieForAuth")
    //These get the values of the textareas after the form has been submitted
    $sqlSELECT = $_POST["SELECT"];
    $sqlFROM = $_POST["FROM"];
    $sqlJOIN = $_POST["JOIN"];
    $sqlWHERE = $_POST["WHERE"];
    $sqlOTHER = $_POST["OTHER"];
    $sqlSELECTTYPE = $_POST["SELECTTYPE"];
    //This is the variable used to parse out my headers the user entered
    $sqlColNames = split('~',$sqlSELECT);
    //This converts the ~ separator to , so I can actually use it as part of my sql string
    $search = array('~');
    $replace = array(',');
    $mystring = $sqlSELECT;
    $sqlString = str_replace($search, $replace, $mystring);
    //These are the textareas and the drop down options that the end users has to create queries
    echo "<table border=0>";
    echo "<tr><td valign='top'>";
    echo "<B>SELECT TYPE</B> <BR><SELECT NAME=SELECTTYPE>
    <OPTION VALUE='SELECT' SELECTED>SELECT</OPTION>
    <OPTION VALUE='SELECT DISTINCT'>SELECT DISTINCT</OPTION>
    <OPTION VALUE='INSERT'>INSERT</OPTION>
    <OPTION VALUE='UPDATE'>UPDATE</OPTION>
    <OPTION VALUE='DELETE'>DELETE</OPTION>
    </SELECT>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=SELECT wrap=physical>$sqlSELECT</textarea>";
    echo "</td><td valign='top'>";
    echo "<img src='images/sqlC.jpg' width='25' height='25' onclick='colwin()'>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>FROM</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=FROM wrap=physical>$sqlFROM</textarea>";
    echo "</td><td valign='top'>";
    echo "<img src='images/sqlT.jpg' width='25' height='25' border=0 onclick='tabwin()'>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>JOIN</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=JOIN wrap=physical>$sqlJOIN</textarea>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>WHERE</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=WHERE wrap=physical>$sqlWHERE</textarea>";
    echo "</td></tr>";
    //This is where the end user would enter group by, having, order by, etc..
    echo "<tr><td valign='top'>";
    echo "<b>OTHER</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=OTHER wrap=physical>$sqlOTHER</textarea>";
    echo "</td></tr>";
    This is a run query icon and a help icon
    echo "<tr><td colspan=2 align=right>";
    echo "<img src='images/RunQuery.jpg' width='30' height='28' onclick='submit()'> <img src='images/qm.jpg' border=0 width='25' height='25' onclick='help()'>";
    echo "</td></tr></table>";
    echo "<br>";
    echo "<br>";
    //This is where I connect to my remote oracle database
         $conn=odbc_connect('ODBC_ConnectionName','USERNAME','PASSWORD');
    //This is the sql string created by the end users
         $sql="$sqlSELECTTYPE $sqlString FROM $sqlFROM $sqlJOIN $sqlWHERE $sqlOTHER";
    //This executes the connection string and the sql string
         $rs=odbc_exec($conn,$sql);
    //This will display the query or a message if the query is empty
         if($rs!=NULL){
         echo "<table border=1>";
         echo "<tr>";
    //This loops through the string array the end user enter the field name text area to get column headers
         for($i=0; $i<count($sqlColNames); $i++)
         echo "<td>";
         print_r($sqlColNames[$i]);
         echo "</td>";
         echo "</tr><tr>";
    //This actually fetchs the rows from the statement and then display the data based on the column names the end user speificed
         while (odbc_fetch_row($rs))
              for($i=0; $i<count($sqlColNames); $i++)
                   $results=odbc_result($rs,$sqlColNames[$i]);
                   echo "<td>$results</td>";
              echo "</tr>";
         odbc_close($conn);
         echo "</table>";}else{echo "Results will be displayed here";}
    echo "<br><br>";
    echo $sql;
    else
    echo "Not logged in";
    ?>
    </form>

    This looks more like a SQL question than a PHP issue. There are a couple of JOIN examples at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#i2066611 that might you work through the problem.

Maybe you are looking for