Problem connecting using VB Oracle Data Control oradc.ocx but otherwise ok.

I am trying to run one of the sample vb apps DataCtrl that uses the Oracle Data Control (oradc.ocx) to simplify connecting to a database and getting the data into a databound control. I have tried every combination of name/id/pw and get the same error - ORA-12154:TNS:could not resolve service name.
I have 2 of the sample databases created - "employees" and "demo". Using XE, i can open and view both db's with no problem. Using the ODBC configuration dialog I can configure and test the connection to both and tests ok. I have used programs to convert Oracle to Excel and Excel to Oracle and both find the db with no problem either.
If I tnsping to XE, employees or demo, the response is negative. The file tnsnames.ora exists in the /admin dir and lists only XE. The file sqlnet.ora has nothing (except comments) in it.
I have read every bit of documentation on the internet and no help. I just opened "employees" and "demo" again with XE without a problem. However when I try to run the Oracle/Excel conversion programs now, they are now showing the 'name error also. I have tried both the sample VB app and the Oracle/Excel converter programs with XE/employees open and closed and it makes no difference.
Everything that I have read indicates that you should be able to use the actual db name, ie; "employees". I have run out of combinations of names/ids/pws and hope I can get some help here. Thanks in advance.

The firewall was blocking TNSLSNR.exe!

Similar Messages

  • Just got Mac book pro. I can't connect to office remotely thru the remote window. My office is window based and I have no problem connecting while at the office thru the server but cannot at home. Any help would be appreciated!

    Just got Mac book pro. I can't connect to office remotely thru the remote window. My office is window based and I have no problem connecting while at the office thru the server but cannot at home. Any help would be appreciated!

    This what my IT replied with:
    That teh MacBook cannot connect with RWW because it requires Active-X to connect.  That MAc browsers (Safari) do not use Active-X but only Windows (IE) uses Active-X control.
    It would seem to me that there must be a way around this. Any help?
    Thanks,

  • I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    Hi, blank white screen where exactly?
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.5, 10.6, 10.7 & 10.8…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x/10.8.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    If using Wifi/Airport...
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    For 10.5/10.6/10.7/10.8, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
    208.67.222.222
    208.67.220.220
    (There may be better or faster DNS numbers in your area, but these should be a good test).
    Click OK.

  • I use a brower to control a VI ,but what display in the brower is only a HTML,and I can not control it.

    I want realize remote controling.So I use a brower to control a VI ,but what display in the brower is only a HTML,and I can not control it.

    > I use a brower to control a VI ,but what display in the brower is only
    > a HTML,and I can not control it.
    >
    > I want realize remote controling.So I use a brower to control a VI
    > ,but what display in the brower is only a HTML,and I can not control
    > it.
    You don't say what version you are using, but LV6.1 added remote control
    of panels.
    If already using LV6.1, look it up in the help and try out the examples.
    Greg McKaskle

  • Problem connecting Mapview to Oracle Database(Add a data source)

    I’m a neophyte to the mapviewer and I’ve run into a very primitive problem. I can’t view the sample maps in the mapviewer. I can’t connect to the database where I've loaded the sample oracle data (mvdemo.zip) to the database. I have the mapviewer running. I’ve checked my tnsnames to confirm the connection used by other oracle application (sql) and confirmed that the spatial files exists on the database.
    Below is my platform inform
    Platform
    For MapView
    We have Java- j2se_1.4.2_09
    My local system is Microsoft Windows 2000.
    Connect to Oracle 9.2.0.4.0 and 10.1.0.3.1 on separate machines
    Here is my connection infor:
    <?xml version="1.0" standalone="yes"?>
    <non_map_request>
    <add_data_source
    name="mvdemo"
    jdbc_host="medea"
    jdbc_port="1521"
    jdbc_sid="orcl"
    jdbc_user="gda_stock"
    jdbc_password="!********"
    jdbc_mode="thin"
    number_of_mappers="3" />
    </non_map_request>
    Here is the error I received:
    <?xml version="1.0" encoding="UTF-8" ?>
    <oms_error>Message:[MapperConfig] cannot add map data source. Fri Aug 26 17:28:04 CDT 2005 Severity: 0 Description: at oracle.lbs.mapserver.core.MapperConfig.addMapDataSource(MapperConfig.java:583) at oracle.lbs.mapserver.MapServerImpl.addMapDataSource(MapServerImpl.java:315) at oracle.lbs.mapserver.oms.addDataSource(oms.java:1241) at oracle.lbs.mapserver.oms.doPost(oms.java:409) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Unknown Source)</oms_error>

    Hi, is there anyone here who can help me.....thanks in advance!

  • JBO-25080 error on using web service data control

    Not getting any responses to this. Is this a bug? and if so, how can I file the bug?
    Hi
    I'm trying to use Jdev 11g to build a simple web app. The app page uses a web service data control (called "theAssetType"). But I keep getting the following error message when I try to get the "return" message widget onto the page. The name of the service on the server is CM_RJCP2.
    By the way - this service works great with the HTTP analyzer - so not sure why it doesn't work in JSF page.
    Your help greatly appreciated!
    oracle.jbo.NoDefException: JBO-25080: Definition name: CM_RJCP2 does not match the file in which it is loaded from: oracle.myweb.model.theAssetType.CM_RJCP2.CM_RJCP2
         at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:999)
         at oracle.jbo.mom.DefinitionManager.loadParent(DefinitionManager.java:1228)
         at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:933)
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:482)
         at oracle.jbo.mom.DefinitionManager.findDefinitionObjectDontCheckName(DefinitionManager.java:433)
         at oracle.adf.model.bean.DCBeanDataControl.findStructureDef(DCBeanDataControl.java:1884)
         at oracle.adf.model.bean.DCBeanDataControl.getAttributeDefs(DCBeanDataControl.java:1936)
         at oracle.adf.model.binding.DCIteratorBinding.getAttributeDefs(DCIteratorBinding.java:3142)
         at oracle.jbo.uicli.binding.MyIteratorBinding.getAttributeDefs(JUAccessorIteratorDef.java:494)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.fetchAttrDefs(JUCtrlValueBinding.java:485)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDefs(JUCtrlValueBinding.java:437)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:511)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:501)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding$1JUAttributeDefHintsMap.<init>(JUCtrlValueBinding.java:3857)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeHintsMap(JUCtrlValueBinding.java:3952)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getHints(JUCtrlValueBinding.java:2417)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2379)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:277)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:750)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    Edited by: rjcovert on Dec 29, 2009 9:11 AM
    Edited by: rjcovert on Jan 3, 2010 8:31 AM

    Here - for reference is the wsdl
    <?xml version="1.0" ?>
    - <!-- root element wsdl:definitions defines set of related services
    -->
    - <wsdl:definitions name="CM_RJCP2" targetNamespace="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2" xmlns:xai="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2" xmlns:xaixsd="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2.xsd" xmlns:schemans1="http://oracle.com/CM_RJCP2.xsd" xmlns:schemans2="http://oracle.com/CM_RJCP2.xsd" xmlns:ouaf="urn:oracle:ouaf" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <!--
    wsdl:types encapsulates schema definitions of communication types;
    here using xsd
    -->
    - <wsdl:types>
    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:oracle:ouaf" elementFormDefault="qualified">
    - <xsd:element name="Fault">
    - <xsd:complexType>
    - <xsd:all>
    <xsd:element name="ResponseStatus" type="xsd:string" />
    <xsd:element name="ResponseCode" type="xsd:int" />
    <xsd:element name="ResponseText" type="xsd:string" />
    - <xsd:element name="ResponseData" minOccurs="0">
    - <xsd:complexType>
    <xsd:attribute name="parm1" type="xsd:string" />
    <xsd:attribute name="parm2" type="xsd:string" />
    <xsd:attribute name="parm3" type="xsd:string" />
    <xsd:attribute name="parm4" type="xsd:string" />
    <xsd:attribute name="parm5" type="xsd:string" />
    <xsd:attribute name="text" type="xsd:string" />
    <xsd:attribute name="category" type="xsd:string" />
    <xsd:attribute name="numParm" type="xsd:int" />
    </xsd:complexType>
    </xsd:element>
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:oracle:ouaf" elementFormDefault="qualified">
    - <xsd:simpleType name="dateTime">
    - <xsd:restriction base="xsd:token">
    <xsd:pattern value="[0-9]{4}-[0-1][0-9]-[0-3][0-9]-[0-2][0-9]:[0-6][0-9]:[0-6][0-9]" />
    </xsd:restriction>
    </xsd:simpleType>
    - <xsd:simpleType name="date">
    - <xsd:restriction base="xsd:token">
    <xsd:pattern value="[0-9]{4}-[0-1][0-9]-[0-3][0-9]" />
    </xsd:restriction>
    </xsd:simpleType>
    - <xsd:simpleType name="time">
    - <xsd:restriction base="xsd:token">
    <xsd:pattern value="[0-2][0-9]:[0-6][0-9]:[0-6][0-9]" />
    </xsd:restriction>
    </xsd:simpleType>
    - <xsd:simpleType name="money">
    <xsd:restriction base="xsd:decimal" />
    </xsd:simpleType>
    </xsd:schema>
    - <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ouaf="urn:oracle:ouaf" targetNamespace="http://oracle.com/CM_RJCP2.xsd" elementFormDefault="qualified">
    <xsd:import namespace="urn:oracle:ouaf" />
    - <xsd:element name="CM_RJCP2">
    - <xsd:complexType>
    - <xsd:sequence>
    <xsd:element name="assetType" type="xsd:string" minOccurs="0" />
    <xsd:element name="assetTypeDesc" type="xsd:string" minOccurs="0" />
    <xsd:element name="assetTypeId" type="xsd:string" minOccurs="0" />
    <xsd:element name="boStatus" type="xsd:string" minOccurs="0" />
    <xsd:element name="bo" type="xsd:string" minOccurs="0" />
    </xsd:sequence>
    - <xsd:attribute name="transactionType">
    - <xsd:simpleType>
    - <xsd:restriction base="xsd:token">
    <xsd:enumeration value="READ" />
    <xsd:enumeration value="ADD" />
    <xsd:enumeration value="UPDT" />
    <xsd:enumeration value="DELT" />
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:attribute>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </wsdl:types>
    - <!-- wsdl:message elements describe potential transactions
    -->
    - <!-- request CM_RJCP2Request is of type CM_RJCP2
    -->
    - <wsdl:message name="CM_RJCP2Request">
    <wsdl:part name="body" element="schemans1:CM_RJCP2" />
    </wsdl:message>
    - <!-- response CM_RJCP2Response is of type CM_RJCP2Response
    -->
    - <wsdl:message name="CM_RJCP2Response">
    <wsdl:part name="body" element="schemans2:CM_RJCP2" />
    </wsdl:message>
    - <!-- fault CM_RJCP2Fault is of type CM_RJCP2Fault
    -->
    - <wsdl:message name="CM_RJCP2Fault">
    <wsdl:part name="fault" element="ouaf:Fault" />
    </wsdl:message>
    - <!-- wsdl:portType describes messages in an operation
    -->
    - <wsdl:portType name="CM_RJCP2PortType">
    - <!-- the value of wsdl:operation eludes me
    -->
    - <wsdl:operation name="CM_RJCP2">
    <wsdl:input message="xai:CM_RJCP2Request" />
    <wsdl:output message="xai:CM_RJCP2Response" />
    <wsdl:fault name="fault" message="xai:CM_RJCP2Fault" />
    </wsdl:operation>
    </wsdl:portType>
    - <!-- wsdl:binding states a serialization protocol for this service
    -->
    - <wsdl:binding name="CM_RJCP2SoapBinding" type="xai:CM_RJCP2PortType">
    - <!--
    leverage off soap:binding document style @@@(no wsdl:foo pointing at
    the soap binding)
    -->
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <!--
    semi-opaque container of network transport details classed by
    soap:binding above @@@
    -->
    - <wsdl:operation name="CM_RJCP2">
    - <!-- again bind to SOAP? @@@
    -->
    <soap:operation soapAction="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2" />
    - <!--
    furthur specify that the messages in the wsdl:operation
    "CM_RJCP2" use SOAP? @@@
    -->
    - <wsdl:input>
    <soap:body use="literal" namespace="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" namespace="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2" />
    </wsdl:output>
    - <wsdl:fault name="fault">
    <soap:fault name="fault" use="literal" namespace="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2" />
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    - <!-- wsdl:service names a new service "CM_RJCP2Service"
    -->
    - <wsdl:service name="CM_RJCP2Service">
    <wsdl:documentation>CM_RJCP2 version 5: Web service for inbound asset type transaction</wsdl:documentation>
    - <!-- connect it to the binding "CM_RJCP2SoapBinding" above
    -->
    - <wsdl:port name="CM_RJCP2Port" binding="xai:CM_RJCP2SoapBinding">
    - <!-- give the binding an network address
    -->
    <soap:address location="http://tgbu813etm10:6500/XAIApp/xaiserver/CM_RJCP2" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

  • Need to Set Current Row when Using Built-in Data Control Delete Operation?

    I have an af:table bound to a ViewObject (VO) collection (no Entity Object) - within each row, I include a column that contains a 'Remove' command button so the user can remove the row. I add the command button by dragging/dropping the built-in delete operation from the VO on the Data Control Palette. When I use this as is (no changes), the Remove button always deletes the first row in the collection, not the selected row. Do I need to add code to set the current row, and if so can someone please provide an example and specify where I need to add? thanks.
    ------ .jspx af:table with command button to remove each row ------
    <af:table value="#{bindings.ListView1.collectionModel}" var="row"
    rows="#{bindings.ListView1.rangeSize}"
    first="#{bindings.ListView1.rangeStart}"
    // note: I don't have any code added for selectedRow or makeCurrent - assuming this is built-in?
    selectionState="#{bindings.ListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.ListView1.collectionModel.makeCurrent}">
    <af:column>
    <af:commandButton actionListener="#{bindings.Delete.execute}"
    text="Remove"
    disabled="#{!bindings.Delete.enabled}"/>
    </af:column>
    ---------- corresponding pagedef file ------------
    <bindings>.....
    <action id="Delete" IterBinding="ListView1Iterator"
    InstanceName="SrchDataControl.ListView1"
    DataControl="SrchDataControl" RequiresUpdateModel="false"
    Action="30"/>
    </bindings>
    Note: I also tried solution posted on following thread, but again, only first row is deleted, not the selected row?: Delete and Commit
    Message was edited by:
    javaX

    I just want to delete (or remove) it from the VO. Data for this VO is not on the database.
    The function is doing what I want it to do (delete from the VO), its just always deleting the first row, versus the selected row. I select the command button next on a column next to an item further down in the list and it deletes the first row. The problem is setting the selected row to be removed - I thought setting the current row would be taken care of by the SelectListener?
    selectionState="#{bindings.MyIspListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.MyIspListView1.collectionModel.makeCurrent}"

  • Problem connect form6i and Oracle Database 10g

    I can't connect form6i to Oracle Database 10g
    When complete user/password@database fatal error produce:
    "Oracle Forms Designer has encountered a problem and needs to close. We are sorry for the inconvenience"
    Error Detail:
    AppName: ifbld60.exe     AppVer: 6.0.8.27     ModName: ora805.dll
    ModVer: 0.0.0.0     Offset: 000b4f04
    Product Install:
    - Forms Version: Forms [32 bits] Versión 6.0.8.27.0
    - Oracle Database: 10.2.0
    - Win XP professional with SP2.
    Any idea what might cause Forms to shutdown ubnormally?
    Thanks

    If your database is using the AL32UTF8 character set, Forms 6i cannot connect.
    Read this thread:
    connecting form 6i  to oracle database 10G express edition

  • How to used a JCR Data Control in Java class?

    Hi,
    I created a JCR Data Control to my UCM to obtain a treeTable with the datas. But it's impossible to create a treeTable like i want to.
    So I know how to create a treeModel to obtain the treeTable I want.
    Is there a way to used the getItems method of the dataControl in a Java Class?
    I tried this :
    BindingContext bc = (BindingContext)JSFUtils.resolveExpression("#{data}");
    DCDataControl dc = bc.findDataControl("UcmDC");
    But dc is null.
    There are some xml files (UcmDC.xml or getItems_return.xml). Is it a way to resolve my problem. And if so, how do I use?
    Best regards,
    Thomas

    please refer metalink id(305710.1)

  • Problems connecting to an Oracle database

    The service name in my pc is GACASASF and the name of the table that I'm trying to
    query is DEPT.
    Could you please tell me what's wrong with my connection, is not working.
    I think that it has something to do with the connecting string.
    I went to ODBC help for oracle connections and the connection strings that I found are
    1) DSN=Personnel;UID=Kotzwinkle;PWD=;
    2) DRIVER={Oracle ODBC Driver};UID=Kotzwinkle;PWD=whatever;DBQ=instl_alias;
    DBA=W;
    DSN=     ODBC data source name
    UID = user name
    PWD = password
    DBQ = service name
    DBA = connection mode W = write, R = read
    I don't know how to embed this in my syntax.
    I will appreciate any info that you can give me.
    thx,
    Gustavo Casasfranco
    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class TableDisplay extends JFrame {
    private Connection connection;
    private JTable table;
    public TableDisplay()
    // The URL specifying the Books database to which
    // this program connects using JDBC to connect to a
    // Microsoft ODBC database.
    String url = "jdbc:odbc:GACASASF";
    String username = "scott";
    String password = "tiger";
    // Load the driver to allow connection to the database
    try {
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    connection = DriverManager.getConnection(
    url, username, password );
    catch ( ClassNotFoundException cnfex ) {
    System.err.println(
    "Failed to load JDBC/ODBC driver." );
    cnfex.printStackTrace();
    System.exit( 1 ); // terminate program
    catch ( SQLException sqlex ) {
    System.err.println( "Unable to connect" );
    sqlex.printStackTrace();
    getTable();
    setSize( 450, 150 );
    show();
    private void getTable()
    Statement statement;
    ResultSet resultSet;
    try {
    String query = "SELECT * FROM DEPT";
    statement = connection.createStatement();
    resultSet = statement.executeQuery( query );
    displayResultSet( resultSet );
    statement.close();
    catch ( SQLException sqlex ) {
    sqlex.printStackTrace();
    private void displayResultSet( ResultSet rs )
    throws SQLException
    // position to first record
    boolean moreRecords = rs.next();
    // If there are no records, display a message
    if ( ! moreRecords ) {
    JOptionPane.showMessageDialog( this,
    "ResultSet contained no records" );
    setTitle( "No records to display" );
    return;
    setTitle( "Authors table from Books" );
    Vector columnHeads = new Vector();
    Vector rows = new Vector();
    try {
    // get column heads
    ResultSetMetaData rsmd = rs.getMetaData();
    for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
    columnHeads.addElement( rsmd.getColumnName( i ) );
    // get row data
    do {
    rows.addElement( getNextRow( rs, rsmd ) );
    } while ( rs.next() );
    // display table with ResultSet contents
    table = new JTable( rows, columnHeads );
    JScrollPane scroller = new JScrollPane( table );
    getContentPane().add(
    scroller, BorderLayout.CENTER );
    validate();
    catch ( SQLException sqlex ) {
    sqlex.printStackTrace();
    private Vector getNextRow( ResultSet rs,
    ResultSetMetaData rsmd )
    throws SQLException
    Vector currentRow = new Vector();
    for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
    switch( rsmd.getColumnType( i ) ) {
    case Types.VARCHAR:
    currentRow.addElement( rs.getString( i ) );
    break;
    case Types.INTEGER:
    currentRow.addElement(
    new Long( rs.getLong( i ) ) );
    break;
    default:
    System.out.println( "Type was: " +
    rsmd.getColumnTypeName( i ) );
    return currentRow;
    public void shutDown()
    try {
    connection.close();
    catch ( SQLException sqlex ) {
    System.err.println( "Unable to disconnect" );
    sqlex.printStackTrace();
    public static void main( String args[] )
    final TableDisplay app = new TableDisplay();
    app.addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e )
    app.shutDown();
    System.exit( 0 );
    * (C) Copyright 1999 by Deitel & Associates, Inc. and Prentice Hall. *
    * All Rights Reserved. *
    * DISCLAIMER: The authors and publisher of this book have used their *
    * best efforts in preparing the book. These efforts include the *
    * development, research, and testing of the theories and programs *
    * to determine their effectiveness. The authors and publisher make *
    * no warranty of any kind, expressed or implied, with regard to these *
    * programs or to the documentation contained in these books. The authors *
    * and publisher shall not be liable in any event for incidental or *
    * consequential damages in connection with, or arising out of, the *
    * furnishing, performance, or use of these programs. *

    A stack trace for the exception would be very useful!
    Anyway, perhaps you should check that the username/password specified in the code correspond to those required to access the database (username = "Kotzwinkle", password = "whatever"). Sometimes you can get away with specifying these in the ODBC data source, in which case you shouldn't pass them to the getConnection method.
    Hope this helps.

  • Problem in using OCIBindByName  for date type column

    Hi,
    Can you please guide me about my following problem?
    I am trying to fetch the data from system table "FLOWS_020100.WWV_FLOW_ACTIVITY_LOG1$" in Oracle Express edition 10.2.0.3 database, using the OCI library on Windows with C++
    This table has a TIMESTAMP column of date type.
    I've the following query as below:
    select TIME_STAMP from FLOWS_020100.WWV_FLOW_ACTIVITY_LOG1$ where TIME_STAMP > to_date('31/OCT/12 23:59:59', 'DD-MON-YY HH24:MI:SS') order by TIME_STAMP asc;
    For this, first I am preparing the query as below:
    select TIME_STAMP from FLOWS_020100.WWV_FLOW_ACTIVITY_LOG1$ where TIME_STAMP > :PKVAL order by TIME_STAMP asc;
    Before calling OCIExecute(), I am setting the PKVAL buffer to following value:
    "to_date('31/OCT/12 23:59:59', 'DD-MON-YY HH24:MI:SS') "
    & calling the OCIBindByName function with data type as SQLT_DATE.
    But when the OCIExecute is called, my program crashes with access violation
    Can you please guide me what is the correct way to pass the date value in query to OCI? How do we bind the date values?
    Thanks in advance for your time and help.
    Best Regards.

    I had a similar problem. TO_DATE doesn't appear to function w/ BindByName or BindByPos.
    You are going to have to bite the bullet and use an actual date.
    Here's an example (I am using two dates in my query):
    int main (int argc, char **argv, char **envp)
    static text invalidQuery = (text )"SELECT f1.my_val, COUNT(f1.my_val) invalid_count, (SELECT COUNT(*) FROM my_db_table f2 WHERE f2.my_val = f1.my_val AND f2.foo_dt = :1 ) total_count FROM my_db_table f1 WHERE f1.foo_dt = :1 AND ( (f1.vld_bar_sw IS NULL OR f1.vld_bar_sw = 'N') OR (f1.vld_foo_sw IS NULL OR f1.vld_foo_sw = 'N') ) group by my_val order by my_val asc";
    OCIDate boundDateVal;
    sb2 inputYear;
    ub1 inputMonth;
    ub1 inputDay;
    char inputYearStr [] = "0000";
    char inputMonthStr [] = "00";
    char inputDayStr [] = "00";
    /* I get and validate the date as input, but you can set it however you'd like */
    inputYear = (sb2) (atoi (inputYearStr));
    inputMonth = (ub1) (atoi(inputMonthStr));
    inputDay = (ub1) (atoi(inputDayStr));
    /* Allocating Date*/
    OCIDateSetDate ( &boundDateVal, inputYear, inputMonth, inputDay );
    OCIDateSetTime( &boundDateVal, 0, 0, 0);
    returnVal = OCIBindByPos(invalidStmt, &firstInputBindHPtr, myErrorHandle, (ub4) 1,
    (dvoid *) &boundDateVal, (sword) sizeof(boundDateVal),
    SQLT_ODT, /*dty OCIDate*/
    (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);
    if ( !(returnVal == OCI_SUCCESS || returnVal == OCI_SUCCESS_WITH_INFO) )
    displayErrors (returnVal, myErrorHandle, "OCIBindByPos-contactDate 1 ");
    cleanup();
    exit(1);
    }//if
    returnVal = OCIBindByPos(invalidStmt, &secInputBindHPtr, myErrorHandle, (ub4) 2,
    //(dvoid *) &InputArguments.contactDate, (sword) sizeof(InputArguments.contactDate),
    (dvoid *) &boundDateVal, (sword) sizeof(boundDateVal),
    SQLT_ODT, /*dty OCIDate*/
    (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);
    if ( !(returnVal == OCI_SUCCESS || returnVal == OCI_SUCCESS_WITH_INFO) )
    displayErrors (returnVal, myErrorHandle, "OCIBindByPos-contactDate 2 ");
    cleanup();
    exit(1);
    }//if
    }//main
    ** I have had issues w/ OTN not correctly translating certain characters, so hopefully the above example is readable or you can figure out which characters may be missing.

  • Problem connecting using OCI8

    I am getting an error when attempting to connect to a 9i r2 database using OCI8. When I connect using the thin driver all works fine. Are different drivers or installation procedures needed to use OCI8? I am working with BLOB's and wanted to use OCI because I understand it is more efficient thatn the thin driver for this data type.
    The two url's which are used are listed below.
    dbUrl1 "jdbc:oracle:oci8:@svr:1521:orcl"
    Fails with the following error: 500 Internal Server Error : java.lang.NoSuchFieldError: oracle.jdbc.oci8.OCIEnv.envCharSetId
    dbUrl2 "jdbc:oracle:thin:@svr:1521:orcl"
    Works fine.
    Any help is appreciated.
    Thanks in advance.
    Wayne

    Hi Lars-Inge
    I too am working through this same issue. I wasn't using the OracleDataSource object for connecting but rather the DriverManager's getConnection method as seen here:
    Connection conn = DriverManager.getConnection(dbUrl, dbUser, dbPass);
    My dbUrl is: String dbUrl = "jdbc:oracle:oci9:@OraSid";
    Using this approach, I get an "invalid URL" SQL Exception. So I tried the approach from your post using an ods object. Here too, I'm getting a SQL exception "java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL". Here is what my connection code looks like:
    OracleDataSource ods = new OracleDataSource();
    ods.setUser("user");
    ods.setPassword("password");
    ods.setDriverType("oci9");
    ods.setDatabaseName("OraSid");
    ods.setPortNumber(1521);
    ods.getConnection();
    Am I missing something that's causing the SQL Exception?
    Thanks,
    Rajesh Vasisht

  • Problems connecting using MM.MySQL JDBC driver - Please Help

    I have been trying to get the driver to work for the past two days and have hit a brick wall. If someone could offer any ideas on what other steps to try I would so much appreciate it. Here's the situation:
    I'm working on Mac OS X.1, jdk 1.3, mysql (database) and using the mm.mysql driver version 2.0.6.1. I'm using a test script which loads the driver, tries to connect to the 'test' database (which doesn't require a username/password) and then prints out the systems date when successful.
    //load the driver
    Class.forName("org.gjt.mm.mysql.Driver");
    //Try connecting to db
    Connection conn = DriverManager.getConnection(jdbc:mysql:///test", "", "");
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("SELECT now();");
    while (rset.next())
    System.out.println(rset.getString(1));
    // Close result set, statement and DB connection
    rset.close();
    stmt.close();
    conn.close();
    The problem is that everytime I run the script I get an error telling me that the driver could not be found:
    Exception in thread "main" java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    ��������at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    ��������at java.security.AccessController.doPrivileged(Native Method)
    ������at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    ��������at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    ��������at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
    The mysql database is running in the background, the driver's path location has been added to my classpath and I've also tried modifying the driver name as well as using older versions of the driver itself, but still no luck. This needs to be up and running so I can finalize a project I've been working on. If anyone has any ideas on what I could possibly try next, I welcome the suggestions.
    Thanks in advance.

    I didn't realize you had to extract the information either.
    Ok.. so I downloaded the latest jar file from sourceforge, extracted the data and IT WORKED!! Thank you so much. You saved my head from exploding.
    Many thanks.
    -c

  • What is the use of Oracle Data Masking?

    Hi,
    Iam using HCM 9.2, PT 8.53, DB.11.2.0.2.
    What is this particular navigation does??
    PeopleTools >Utilities> Administration >Oracle Data Masking
    does this encrypts the value in the specified field??
    Suggestions welcomed !!
    Aravind.

    Repeated start/stop or redeploy causes memory leak (7393267)
    Repeated start/stop or redeploy of an application causes memory to leak and the server has to be restarted to clean up the memory. New applications created in JDeveloper 11.1.1.0.1 will be configured with a Weblogic Application Lifecycle Listener to handle this scenario. For older applications migrated to 11.1.1.0.1, the listener will need to be manually added to the weblogic-application.xml of the application to solve this issue.
    <listener>
    <listener-class>oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener</listener-class>
    </listener>
    From : http://www.oracle.com/technetwork/developer-tools/jdev/knownissues-096030.html

  • Problem connecting using opmn

    Hi all,
    i have some problems connecting remotely to an ejb application using
    opmn.
    I use OAS 10.1.2 installed on a linux redhat, on my machine (windows
    xp) i have j2ee application deployed in a oc4j stand alone 10.1.2 ,
    whose services must connect via rmi to an ejb application deployed in
    the application server on the server. I have defined a file of
    properties on the local machine, where i have set the paramters to
    connect to the server, the content of this file is like this:
    java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
    java.naming.provider.url=opmn:ormi://deploy:6004:S3/EjbApp
    java.naming.security.principal=userlogin
    java.naming.security.credentials=userpassword
    dedicated.rmicontext=true
    where S3 is the name of the instance in the oas.
    Trying to connect to the application EjbApp, as described in the
    properties i have the error:
    javax.naming.NamingException: Lookup error: java.io.EOFException:
    Disconnected; nested exception is:
    java.io.EOFException: Disconnected [Root exception is
    java.io.EOFException: Disconnected]
    at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:168)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    There are not problems if i decide to connect to the ejb application
    directly using the rmi port, when i try to use the opmn there is the
    error reported above.
    Moreover connecting using opmn to another ejb application, deployed in
    to another instance of the same application server, all works fine.
    It seem to be the particular instance S3 has some problems, but i don't
    know what.
    Thanks for your help
    Message was edited by:
    user487637

    The firewall was blocking TNSLSNR.exe!

Maybe you are looking for