RE: Problems setting up environment failover SOLVED.

Kamran:
Solved the problem.
You know what was causing the problem ? The way I was copying files to
the destination environment. Yes, I was copying the files to vithar from
kronos in ASCII mode, which in turn modified the header information for
each file and Forte could not interpret them. Thanks to Martin who
found out this, and we copied the entire appdist dir structure again in
binary mode RE-INSTALLED all and now every thing looks great.
Thank you very much Kamran for your quick responses !
Thiru.
Get Your Private, Free Email at http://www.hotmail.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Kamran:
Solved the problem.
You know what was causing the problem ? The way I was copying files to
the destination environment. Yes, I was copying the files to vithar from
kronos in ASCII mode, which in turn modified the header information for
each file and Forte could not interpret them. Thanks to Martin who
found out this, and we copied the entire appdist dir structure again in
binary mode RE-INSTALLED all and now every thing looks great.
Thank you very much Kamran for your quick responses !
Thiru.
Get Your Private, Free Email at http://www.hotmail.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Similar Messages

  • Named Anchored Obj-Environment Failover

    Hi to all,
    We connect from EnvA to EnvB giving the user directory parameter as / and
    set the Environment Search Path
    as EnvA:EnvB. From both environments we start and register
    '/glob/obj1' named anchored objects with the same name.
    From a client we connect to EnvA and bind to'/glob/obj1' when we shutdown EnvA partition it fails-over to
    EnvB. And then we restart EnvA partition. We restart/rebind the client and
    try to use object. We see that it is using the EnvB object.
    Although we started the primary environment object again.
    It is not using the search path. Once we shutdown secondary environment
    it starts using primary environment object.
    When we try to use relative path when we are binding the object
    First parameter ('glob/obj1') No first slash. Trying 3rd parameter
    for bind function or just using environment search path, Is is not able to
    find the object. From nsls command I figured out that
    under the root directory
    /forte/UUID of ENVA/node
    /site
    /UUID of ENVB
    /glob/obj1
    names are available. When we use relative path (without slash)
    is it trying to find /glob/obj1 under the /forte/UUID of ENVA
    but we are registering the name under the root.
    What is the reason of this odd behaviour or is this a bug?
    Any answer will be appreciated,

    Hi Juliesmiley,
    According to your description, I recommend you check the conditions required for an automatic  failover.
      • Primary replica and secondary replica are both configured for syschronous-commit mode and set to AUTOMATIC failover.
      •  All availability databases that are defined in the availability group must be in a SYNCHRONIZED state between the primary replica and the secondary replica.
      • The Windows Server Failover Clustering (WSFC) cluster has quorum.
      • The primary replica has become unavailable.
    For more information, please review the following articles.
    Failover and Failover Modes (AlwaysOn Availability Groups)
    Troubleshooting automatic failover problems in SQL Server 2012 AlwaysOn environments
    Thanks,
    Lydia Zhang

  • Runtime Error setting the 'Environment' when running with TWO executables

    Hello,
    I'm using XML DB for the very first time, so this problem may be easy to solve.
    I'm currently running a test with TWO separate C# Console executables.
    One executable correctly sets up the Xml Environment, Manager, and Container and simply adds XML documents to the database.
    The second executable simply is supposed to run some XQuery commands. I use the same Environment, Manager, and Container code to do the initialization. However, I'm having trouble with setting up the 'Environment' in this executable. I get the following error:
    DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery, exception code = DATABASE_ERROR
    On this line of code:
    Sleepycat.Db.Environment env = new Sleepycat.Db.Environment(envdir, envconf);
    I've only seen code examples that run in a SINGLE executable. I'd really like to access the XML DB from multiple threads/executables, but am having trouble.
    Can there be multiple 'Environments' and 'Managers' for the one XML Db?
    Will provide more data if needed, and thanks for any help!
    Matt

    I guess you addressing this in the wrong forum. I see tags like "sleepycat" and "C#", probably thats why nobody replied.

  • Environment Failover

    Dear Forte-users,
    here is a tricky question.
    I'm checking the Forte' functionality that allows you to put multiple
    addresses in FORTE_NS_ADDRESS, so that a client can connect to an
    alternative environment in case of failover.
    I have deployed my application in two alternative environment, called
    AEnv and BEnv respectively.
    I've paid attention to deploy the application exactly in the same way in
    the two environment, that is, with the same partition numbering, so that
    my application is deployed correctly to the client.
    I've started two environment manager:
    start_nodemgr -e AEnv -fns srv1:5000 -fnd srv1Node
    start_nodemgr -e BEnv -fns srv2:6000 -fnd srv2Node
    onto two different machines.
    I've set my client FORTE_NS_ADDRESS to srv1:5000;srv2:6000 so that when
    srv1 crashes, my client "should" automatically connect to srv2.
    My application consists of three partitions: a client partition and two
    server partition. The two server partition are replicated for failover
    and are distributed to two different logical nodes. In environment AEnv
    the two logical nodes corrispond to two different machines, whilst in
    Benv the two logical nodes are on the same physical machine.
    The platforms in use are: PC client (Windows 95) and AIX servers.
    After all these setup operations, I've started up with my work.
    To simulate an hardware crash of srv1, I killed all Forte' processes
    (ftexec and all nodemgr) while my application was running, then I made a
    new request to a server partition.
    What I espected from Forte' was that my application connected to the
    alternative environment and an autostart of the server partitions were
    made in order to satisfy my client request.
    What happens instead is that I receive a DistributedAccessException and
    I have to exit the application. If I then execute again the application,
    this time Forte' correctly connects to BEnv and autostarts the server
    partitions.
    I've also tried to start manually the server partitions in BEnv from
    econsole, but with the same result.
    In order to understand this behaviour, I've set the trc:do:35 flag.
    Reading the trace messages, I've seen that in the case of a new
    execution of the application there is at a certain time an
    "InitiateNsBind", a "ClientCreateEnvironment" and some
    "RegisterPartition". When I read the trace messages generated in the
    case of DistributedAccessException I noted that Forte' correctly
    initiates a bind to BEnv, but after that there is a "Got NAMESERVERAVAIL
    event" message and no "ClientCreateEnvironment" or "RegisterPartition"
    messages.
    So I think it tries to use old references in the new connected
    environment.
    Thanks in advance for reading till the end !
    If anyone has any idea or opinion, please let me know.
    Regards,
    Cristina.

    Thank you Don.
    I know that I have to handle the exception in case of Transaction or
    Session Duration and I handled in fact the DistributedAccessException. I
    think my problem could be connected to what you said by the end:
    Specifying multiple name server addresses in FORTE_NS_ADDRESS onlyapplies to initial startup by the client. If the primary name server can't
    be found, the client will try the other addresses in FORTE_NS_ADDRESS.
    Once the client is connected, it uses the environment search path for
    failover.
    because I haven't used the search path.
    And
    Fourth - have you "warmed up" the application by talking to all serviceobjects in all partitions? Doing this will ensure that the client has a
    list of all service objects in all partitions, in all connected
    environments.
    Yes, my request to the server partition involves al Service Objects, so my
    client has a list of all of them.
    I will try setting the environment search path.
    Greeting,
    Cristina.
    [email protected] il 02/09/97 18.16.19
    Per: Cristina Tomacelli/CSI/IT
    cc: [email protected]
    Oggetto: Re: Environment Failover
    Cristina,
    I'm assuming that you have connected the two environments. Keep in mind,
    when connecting environments, that one environment is the "master", and
    others are "subordinates." Thus, if Aenv was the master environment, you
    should connect Benv to it.
    Secondly, have you set the environment search path? For example:
    @AEnv:@BEnv
    Third, unless you're using message dialog duration, you will either have to
    catch the AbortException (for transaction duration,) or the
    RemoteAccessException for session duration. If you receive either of these
    events, you would have to retry your message.
    Fourth - have you "warmed up" the application by talking to all service
    objects in all partitions? Doing this will ensure that the client has a
    list of all service objects in all partitions, in all connected
    environments.
    Specifying multiple name server addresses in FORTE_NS_ADDRESS only applies
    to initial startup by the client. If the primary name server can't be
    found, the client will try the other addresses in FORTE_NS_ADDRESS. Once
    the client is connected, it uses the environment search path for failover.
    Hope this helps,
    Don
    At 04:34 PM 9/1/97 +0100, Cristina Tomacelli wrote:
    Dear Forte-users,
    here is a tricky question.
    I'm checking the Forte' functionality that allows you to put multiple
    addresses in FORTE_NS_ADDRESS, so that a client can connect to an
    alternative environment in case of failover.
    I have deployed my application in two alternative environment, called
    AEnv and BEnv respectively.
    I've paid attention to deploy the application exactly in the same way in
    the two environment, that is, with the same partition numbering, so that
    my application is deployed correctly to the client.
    I've started two environment manager:
    start_nodemgr -e AEnv -fns srv1:5000 -fnd srv1Node
    start_nodemgr -e BEnv -fns srv2:6000 -fnd srv2Node
    onto two different machines.
    I've set my client FORTE_NS_ADDRESS to srv1:5000;srv2:6000 so that when
    srv1 crashes, my client "should" automatically connect to srv2.
    My application consists of three partitions: a client partition and two
    server partition. The two server partition are replicated for failover
    and are distributed to two different logical nodes. In environment AEnv
    the two logical nodes corrispond to two different machines, whilst in
    Benv the two logical nodes are on the same physical machine.
    The platforms in use are: PC client (Windows 95) and AIX servers.
    After all these setup operations, I've started up with my work.
    To simulate an hardware crash of srv1, I killed all Forte' processes
    (ftexec and all nodemgr) while my application was running, then I made a
    new request to a server partition.
    What I espected from Forte' was that my application connected to the
    alternative environment and an autostart of the server partitions were
    made in order to satisfy my client request.
    What happens instead is that I receive a DistributedAccessException and
    I have to exit the application. If I then execute again the application,
    this time Forte' correctly connects to BEnv and autostarts the server
    partitions.
    I've also tried to start manually the server partitions in BEnv from
    econsole, but with the same result.
    In order to understand this behaviour, I've set the trc:do:35 flag.
    Reading the trace messages, I've seen that in the case of a new
    execution of the application there is at a certain time an
    "InitiateNsBind", a "ClientCreateEnvironment" and some
    "RegisterPartition". When I read the trace messages generated in the
    case of DistributedAccessException I noted that Forte' correctly
    initiates a bind to BEnv, but after that there is a "Got NAMESERVERAVAIL
    event" message and no "ClientCreateEnvironment" or "RegisterPartition"
    messages.
    So I think it tries to use old references in the new connected
    environment.
    Thanks in advance for reading till the end !
    If anyone has any idea or opinion, please let me know.
    Regards,
    Cristina.

  • Problems setting up a Domain - javax.management.InstanceNotFoundException

    I am having problems setting up a Domain. The following steps summarize
    what I have done.
    1. Created FooDomain in d:/bea/wlserver6.0/config and created
    appropriate config.xml, startup scripts, security, etc... (FooDomain
    boots ok)
    2. Moved console.war to bea/wlserver6.0/config/FooDomain/applications
    3. Connected to FooDomain via console (works ok).
    4. Defined machine FooMachine (happens to be localhost)
    5. Defined new server FooServer (in addition to default myserver) and
    assigned it to FooMachine.
    6. Created a new directory d:/managedServers/FooServer (note - outside
    installation directory)
    7. Created directories d:/managedServers/FooServer/logs &
    d:/managedServers/FooServer/applications
    8. Copied sample startManagedServer.cmd from mydomain to
    d:/managedServers/FooServer & modified appropriately.
    9. Ran startManagedServer.cmd (Note: I was able to connect to the
    Administration Server ok)
    The problems are as follows. (From the console - pointing to the
    Administration Server for the FooDomain)
    1. I am unable to configure a DefaultWebApp_FooServer to be located at
    d:/managedServers/FooServer/applications. I get the following exeption:
    javax.management.InstanceNotFoundException:
    FooDomain:Name=DefaultWebApp_FooServer,Type=WebAppComponent.
    2. I get a similar error when trying to set FooServer log locations to
    d:/managedServers/FooServer/logs
    Any ideas as to why? This then begs the question, what if FooServer was
    on a different physical server altogether. How would I define the
    location of the DefaultWebApp and logs.
    Thanks
    jay ()

    If you want your application work, think my way. At least, all my teammates have used this method to build their development environment. If you are more interested to debug for Weblogic, contact your support representative. The tools from Administration console look very nice, but not function as you want (e.g., the tool to convert version 5.1 application to version 6, even monitor tools). Administration console is very nice to be used to configue the parameters for a domain, but not so trustful and not for application setup in my own experience and that is why I suggest you use mydomain and DefaultWebApp_MyServer as templates. By the way, I did modify config.xml manually to change the default web application entry, etc, to what I want.
    Jay Zammit <[email protected]> wrote:
    I did not modify config.xml manually. In fact, I am able to boot both the Administration Server & Managed Server. The problem happens when using the Administration console to assign my logs and Default Applications directory to the d:/managedServers/FooServer/logs, and d:/managedServers/FooServer/applications/DefaultWebApp_FooServer directories. Try it yourself. Go to the Configurer WebApp option and type in a fully qualified directory such as d:/managedServers/FooServer/applications/DefaultWebApp_FooServer
    and see if it works on your system.
    thanks
    jay ()
    Xiang Rao wrote:
    One suggestion. Use the default domain mydomain as a template. Just make a copy of "mydomain" in folder config and rename the copy to whatever you like. Use some help tools to search all files (non-binary files) in new domain for key word "mydomain" and replace these words with your new domain name. To build an application, just rename the DefaultWebApp_MyServer to what you like and search "DefaultWebApp_MyServer" in all files (non-binary files) in your new domain and replace these words with yournew application name. Note you need to modify the scripts accordingly. Then you can run "startWeblogic" in your new domain directory to start your new domain. Other parameters should be configured by Administration console. If you manually modify configuration files, you could expect some bad news without reason.
    Jay Zammit <[email protected]> wrote:
    I am having problems setting up a Domain. The following steps summarize
    what I have done.
    1. Created FooDomain in d:/bea/wlserver6.0/config and created
    appropriate config.xml, startup scripts, security, etc... (FooDomain
    boots ok)
    2. Moved console.war to bea/wlserver6.0/config/FooDomain/applications
    3. Connected to FooDomain via console (works ok).
    4. Defined machine FooMachine (happens to be localhost)
    5. Defined new server FooServer (in addition to default myserver) and
    assigned it to FooMachine.
    6. Created a new directory d:/managedServers/FooServer (note - outside
    installation directory)
    7. Created directories d:/managedServers/FooServer/logs &
    d:/managedServers/FooServer/applications
    8. Copied sample startManagedServer.cmd from mydomain to
    d:/managedServers/FooServer & modified appropriately.
    9. Ran startManagedServer.cmd (Note: I was able to connect to the
    Administration Server ok)
    The problems are as follows. (From the console - pointing to the
    Administration Server for the FooDomain)
    1. I am unable to configure a DefaultWebApp_FooServer to be located at
    d:/managedServers/FooServer/applications. I get the following exeption:
    javax.management.InstanceNotFoundException:
    FooDomain:Name=DefaultWebApp_FooServer,Type=WebAppComponent.
    2. I get a similar error when trying to set FooServer log locations to
    d:/managedServers/FooServer/logs
    Any ideas as to why? This then begs the question, what if FooServer was
    on a different physical server altogether. How would I define the
    location of the DefaultWebApp and logs.
    Thanks
    jay ()

  • Problems setting up dual monitors

    I am having problems setting up dual monitors on a band new HP envy 700 using windows 8. I just bought this computer and bought DVI to via adapters to use. Everything is hooked up but nothing is happening on the 2nd monitor. Help!

    Jaimetech3, welcome to the forum.
    When requesting help you should always include the make/model (i.e. p6-xxxx) of the computer and/or monitor. This information is necessary for us to review the specifications of them.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Problems setting up my new iphone 4s

    am having problems setting up my new iphone 4s

    Until you tell us the exact problem you are having, any error messages, and what you have tried to solve your problem, we cannot help you.

  • Problems setting up C8180 software Ps_A10_02_NET_FULL_WIN_WW_130_140uu (311.96mb) HELP!

    Problems setting up C8180 software Ps_A10_02_NET_FULL_WIN_WW_130_140uu (311.96mb) HELP!

    Hello a2fay,
    I see that this is your first visit to the HP Forums.  Let me please take a moment to say "Welcome".
    To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I see that you are having some issue with installing the printer on to your computer.  So I can better assist you, what is the operating system you are using on your computer. 
    Which Windows Operating System am I running?
    One step that you can try is to run the HP Printer Install Wizard for Windows.
    If you do not have time today to write me back, I hope you have a great Thursday.
    Cheers,
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Problem setting up WDS with MSI RG54GS2 & Motorola WR850g

    Problem setting up WDS with WR850g & MSI RG54GS2
    Hi,
    I'm trying to bridge 2 routers: Motorola WR850g & MSI RG54GS2 .
    I set the MSI as the main router (it works better for me as a router than the Moto), and the Moto is the repeater. I have set it up exactly as the guide on Broadbandreports.com for the Motorola , and on Tom's Networking http://www.tomsnetworking.com/2004/04/14/how_to_wds_bridge/
    The Moto sees the MAC of the MSI (Status is UP), the MSI doesn't have a page that shows WDS MACs . I know the routers are connected because when I connect a laptop to the Moto wireless network, it gets an IP (and the DHCP on the Moto is disabled) and the default gateway of the connection is the IP of the main (MSI) router.
    The problem is I can't surf anywhere. I can't even ping the MSI router - which should be possible if the WDS works properly.The Moto Wireless Bridge Operation is set properly to Access Point/Wireless Bridge .
    Can anyone solve this?
    Thanks.

    David, welcome to the discussions.
    Are you refering to Airport Extreme Setup as the Extreme base.
    Or are you using a 3rd party Router as your primary Base, or the Express as the primary base.
    Read the supplied link, Not all 3rd party routers are WDS compatible.
    http://discussions.apple.com/thread.jspa?messageID=2785566
    Who is you Internet Service Provider?
    What brand and Model Modem did they furnish?
    Are you using Dial-Up...DSL...or Cable?
    http://docs.info.apple.com/article.html?artnum=303595
    See if there is any help from this link.
    http://discussions.apple.com/thread.jspa?messageID=607414
    Cheers Don

  • Problem setting up smtp mail out .

    Hi all you good people .
    I am having a problem setting up the mail program . I'm using mail two under os-x leopard 10.5.7 . I have the pop mail working fine , but for some reason or another it wont send the mail out . I remember I got it working before , but it was a pain in the butt to do . So I ma forced to use Microsoft Entourage for my mail receiving and sending . I think Microsoft Takes more skill to use than the apple mail program .
    I would love for someone to help me solve this . My mail server is from time warner . I use there High speed internet for my mail access .
    P.S Roadrunner .

    Hi,
    I assume you are using Mail 3.6, and not "mail two"?
    What Authentication are you using on this SMTP? If not already, try using None, and removing Password and Username from SMTP setup for at least one test. Most Roadrunner SMTP are authenticated by reference to the IP address of your Modem, and using a separate authentication of the SMTP results in failure.
    Mail Preferences/Accounts/Account Information, then click on the arrows beside the name of the SMTP in the section on Outgoing Server. After you click on the arrows, choose Edit Server List. Then if the SMTP is set up with the correct name, etc, click on the Advance Tab, use Custom Port with Port 25, None as authentication, and do not enter any Username and Password. Under authentication of None, the name of the SMTP will not have your Username appended. This is the equivalent, after having previously done the set up, to those email clients with a setting to use the info of the Incoming for authentication.
    Let us know, but Roadrunner can vary from area to area on this, but this is the way it seems to always work.
    Ernie

  • Problems setting up multilevel categorization in 7.0

    Hello Gurus!
    I used the category schema in 4.0 a couple of years ago, and now I am assigned on a 7.0 project. I am trying to set up multilevel categorization for case management (Trying to deactivate some developlments and go back to standard) but the information I found on help and the experience I had from 4.0 are not helping.
    I have the problem when I go into the category modeler BSP that no application is available on the application areas, even tough I have created a Z entry in Define application areas for categorization menu. If I dissable the filter, I see my Z entry, but apparently I can not use it...
    I also tried the old style, but the subject profile is not selectable on the BSP and have not found where to link it in SPRO.
    Any help or documentation on this new version will be deeply appreciated.
    Regards,
    Juan P.

    You are right... at least I will post my self found answers in case they may help someone else...
    For the first question regarding case management and categorization...
    I followed the basics, did not assign the levels to a specific catalog (was not sure if this was a requirement) just created a categorization schema and assigned to a case type, my problem was with authorizations but solved by Basis... sorry can not help there. later creates a BSP that took the labels configured and loaded the combos dynamically in order not to use the tree component... and restrict to the values and labels configured. (hoped there would be a standard way to use the labels, but did not receive any answer and this simple steps did the trick)
    To the second part of the question, it was even simpler... just went into CRMD_ORDER, created an activity and selected from the menu Extras->Templates->Create... I am surprised I could not find any documentation on such an easy step...
    This can also be done from the CASEWORKER profile in WEB UI

  • Problem setting up email on new Ipad

    I have a problem setting up my email account on my new Ipad. I've checked the settings and password which are entered correctly. The Ipad error message states "Cannot Get Mail" the user name or password for "....." is incorrect. Any ideas please ??

    Problem solved. The ipad default is set to IMAP. When I changed it to a POP server, problem solved.

  • WRT120N problem setting Static IP

    My provider gives me static IP
    IP 172.17.158.183
    MASK 255.255.252.0
    GW 172.17.156.255
    There is a problem setting gateway 172.17.156.255 in WRT120N. It says that it's wrong gateway.
    On my notebook Network settings work, but how can I setup WRT120N to work with this network settings?
    Solved!
    Go to Solution.

    You are not right.
    Using search I found  solution fo my problem.
    http://homecommunity.cisco.com/t5/Wireless-Routers/Bug-report-CIDR/m-p/311698/highlight/true#M163772
    And it's work fine now.
    There is a bug in scripts that check gateway, mask and IP.

  • Having problems setting up iMessage

    I'm having problems setting up iMessage on my iPod Touch.  I have several iphones and they all were configured out problems.  But I'm having difficulty getting this to work on an iPod touch.
    The iPod touch has been upgraded to the latest iOS 5.01 from  iOS 5.0 and I still have problems...
    I have a valid iCloud account
    iCloud is setup and working fine on this iPod touch
    I've shut-down and restarted the iPod touch
    I've done a hard-reset
    Wifi is setup properly...
    Here's the issue:
    I open iMessage (either through the Messages app, or via Settings/Messages
    I'm asked to enter the Apple ID.  So I enter my Apple ID and password
    I click "Sign In"
    The app moves to the next screen - "People will message you using your email address.  What email address would you like to use?".  I enter the same gmail address I'm using for my Apple ID
    I click the Next button and it scrolls back to the original "Enter Apple ID" sign in screen in Step#2.   No error message appears.
    So I don't really know what to try next..

    OK - solved my own issue finally.
    The answer was buried in another thread within a reply from user fdm1979.
    The time on this particular iPod was wrong...just flip the Date/Time to "Set Automatically", and then suddently imessage and FaceTime started working.

  • Problems setting up username & password for SQL

    Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
    This leads me to request help with my next biggest problem:
    Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
    I am a simple bloke, with simple thought processes, so please, go easy on me...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery1 {
         String username = "" , password = "";
         public static void main(String[] arguments) {
              PassDB UPass = new PassDB();
              String data = "jdbc:odbc:JavaTestDataBase";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
                   Statement st = conn.createStatement();
                   ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
              catch (SQLException s) {
                   System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
              catch (Exception e) {
                   System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         String username = "", password = "";
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              setVisible(true);
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              username = uname.getText();
              password = pword.getText();
    This code generates two errors, stating:
    C:\Java_progs>javac DBQuery1.java
    DBQuery1.java:14: non-static variable username cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
    ^
    DBQuery1.java:14: non-static variable password cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
                    ^
    2 errors*****************************
    The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
    I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
    I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
    If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
    When I try & search 2 different tables, as in:
    ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
                   ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
    As always, I am extremely appreciative of any assistance you are able to offer.
    Kind regards
    duBedat
    [email protected]

    This is where I'm at now:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery {
         static String username = "" ;
         static String password = "" ;
         public static void main(String[] arguments) {
         PassDB UPass = new PassDB();
         String data = "jdbc:odbc:JavaTestDataBase";
         try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
              Statement st = conn.createStatement();
              ResultSet rec = st.executeQuery(
              "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
              + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                   "SELECT Subject, ContactID FROM Calls "
                   + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
         catch (SQLException s) {
              System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
         catch (Exception e) {
              System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         static boolean getOut = false;
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         public PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();          
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              while(getOut == false)
                   setVisible(true);                         
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              DBQuery.username = uname.getText();
              DBQuery.password = pword.getText();
              getOut = true;               
    }          Any advice is greatly appreciated
    duBe

Maybe you are looking for

  • Reporting Services 2008 error

    Good morning all, I'm using SQL Server 2008 R2 reporting services, and I'm having a problem with the report server and manager pages.  I've been able to configure everything in the Reporting Services Configuration Manager, and created the ReportServe

  • How to express cell format in Numbers?

    In Numbers on Mac, I want all positive numbers in cells to display in blue with comma separators and a leading + sign.  Example: the value 4135 should appear as +4,135 I want all negative numbers in cells to display in red with comma separators and a

  • Not picking up Toplink Descripters or classes from dependant project

    Working w/ beta3 of the designer, and building a database adapter to do an insert, I've noticed that the BPEL process generates its own set of Offline Database Tables, Toplink Mappings and object classes, even though these offline tables, objects and

  • Snow Leopard Mac Mini install

    I have a 2006 intel Mac Mini 10.4 and I have the Snow Leopard Install dvd in it and it has been 3 hours installing. Is this normal?

  • ECC 6.0 Upgrade - Tips, Tricks, Lessons Learned needed (Esp. in SD, LO, MM)

    Greetings Experts! I am searching for information and/or documentation in regards to tips, tricks, lessons learned, and "steps to take" while upgrading to ECC 6.0 (from 4.6c, to be specific). We have the install guides, and I'm currently looking at t