How to set connectString in the connect?

if i am not install Oracle client,can i use occi?
if i will access a remote db,how do it?

Try the documentation :
Oracle C++ Call Interface Programmer's Guide, chapter 2.
See the section "Connecting to a Database"

Similar Messages

  • How to set connectString?

    Please help me!
    I have been doing som tests to connect to database in OCCI Environment,but failed.
    Test 1:
    I connect to database use connectString with "MYORA", but show folllwing wrong message:
    ---------Wrong Message-----------
    the connectString is:
    MYORA
    the error is:12705
    the error is:ORA-12705: invalid or unknown NLS parameter value specified
    ---------Wrong Message-----------
    Test 2:
    Then I use Following string, The errors still occur:
    ---------Wrong Message-----------
    the connectString is:
    (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.
    181.21.1)(PORT = 1521)) ) (CONNECT_DATA = (SID = yxora) (SERVER
    = DEDICATED) ) )
    the error is:12705
    the error is:ORA-12705: invalid or unknown NLS parameter value specified
    ---------Wrong Message-----------
    Test 3:
    I modify the connectString is:
    //10.181.21.1:1521/YXORA
    Then connect, but the error is still!
    ---------Wrong Message-----------
    the connectString is:
    //10.181.21.1:1521/yxora
    the error is:6401
    the error is:ORA-06401: NETCMN: invalid driver designator
    ---------Wrong Message-----------
    Test 4:
    I connect to database useing MYORA in sqlplus, It is successfull!
    How to set connectString in OCCI Environment?
    Note:
    *1.The "MYORA" is seted in file "tnsnames.ora" is:
    MYORA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.181.21.1)(PORT = 1521))
    (CONNECT_DATA =
    (SID = yxora)
    (SERVER = DEDICATED)
    *2.I work under Winxp+vc6

    1. My test code:
    #include "stdafx.h"
    #include <occi.h>
    #include <iostream.h>
    using namespace oracle::occi;
    using namespace std;
    const string userName = "test";
    const string ppassword= "oratest";
    //const string connectString="//10.181.21.53:1521/TESTORA";
    const string connectString="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.181.21.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=YXORA)))";
    int main(int argc, char* argv[])
         printf("\n1.Create Environment!\n");
         Environment *env = Environment::createEnvironment();
              try{
                   printf("\n2.Create Connection!\n");
                   cout<<"the connectString is:\n"<<connectString.c_str()<<endl;
                   Connection *conn = env->createConnection(userName,ppassword,connectString);
                   printf("\n3.Create Statement!\n");
                   Statement *stmt = conn->createStatement("Select ZHH,HM from ydd where zhh<10");
                   printf("\n4.Run SQL!\n");
                   ResultSet *rs=stmt->executeQuery();
                   printf("\n5.SQL Return result!\n");
                   while(rs->next()){
                        printf("ZHH=%d,\tHM=%s",rs->getInt(1),rs->getString(2));
                   stmt->closeResultSet(rs);
                   conn->terminateStatement(stmt);
                   env->terminateConnection(conn);
              }catch(SQLException ex){
                   string s = ex.getMessage();
                   cout<<"the error is:" << ex.getErrorCode()<<endl;
                   cout<<"the error is:" << s.c_str()<<endl;
         Environment::terminateEnvironment(env);
         return 0;
    the output is:
    1.Create Environment!
    2.Create Connection!
    the connectString is:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.181.21.1)(PORT=1521))(CONNECT_DATA=
    (SERVICE_NAME=YXORA)))
    the error is:12705
    the error is:ORA-12705: invalid or unknown NLS parameter value specified
    Press any key to continue
    2. I test under Server9i/Client9i ,
    3. How to set Environment?
    4. I think this error is caused by Character set. My server's Character set is ZHS16GBK. I how to identified Charcter set in my OCCI program?

  • How to set and retrive the index log path stored by parameter LOG_DIRECTORY

    how to set and retrive the index log path stored by parameter LOG_DIRECTORY.

    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239

  • How to set values to the structure containing a node with cardinality 0..n

    Hello.
    I 'm trying to set values for the node with cardinality 0..n. The node type is "Fields".
    <xsd:complexType name="Field">
       <xsd:sequence>
          <xsd:element name="fieldCode" type="xsd:string"></xsd:element>
          <xsd:element name="displayValue" type="xsd:string" minOccurs="0"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Fields">
       <xsd:sequence>
          <xsd:element name="field" type="tns:Field" minOccurs="0" maxOccurs="unbounded"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    I  need to set several values for the element "fieldCode" but it has cardinality 0..1 and BPM does not allow it but I did not find any option about how to set values for the structure of type "Fields". Could you help me?
    Best regards,
    Timur Semenchuk

    Hi Marcus,
    If there is no way you could change the cardinality of the node, and thus it can contain 0..n items, I think you should create-and-add a new element programmatically.
    Since the collection can contain zero elements, I would add a 'new' button, which upon clicking adds one new element via:
    IYourNodeElement yourNodeElem = wdContext.nodeYourNode().createYourNodeElement();
    wdContext.nodeYourNode().addElement(yourNodeElem);
    Hope this explains a bit!
    Best,
    Robin van het Hof

  • Does anyone know how to set alerts in the iCloud calendar of Outlook 2010 for PC?

    Does anyone know how to set alerts in the iCloud calendar on Microsoft Outlook 2010 for a PC?  Outlook gives me a warning message and does not allow me to save alerts for calendar events created in iCloud calendar.  It will allow me to save events in the non-iCloud calendars.

    Ignore what office says, when the warning comes up saying that the reminder will not work click on yes,
    I just tested it and i had the reminder on my ihpone in outlook and also as i had the calendar open in safari it popped up on there too ( I wasn't aware it did that)

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

  • How do I get to the connection doctor

    My email is not being forwarded to 'Mail' so how do I get to the connection doctor?

    Thank  you so much.  It helped.  It's difficult to remember where everything is when you only have a problem once in a while.

  • How to set Border in the Excel using UTL_FILE ?

    Hi all,
    Any one aware of
    How to set Border in the Excel using UTL_FILE ?
    Am doing excel creation from a stored procedure.
    Thanks
    Dora

    Hello Dora,
    if you need more than simple csv: at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the package behind the second link supports defining your own formats (and has a tutorial how to do it).
    Regards
    Marcus

  • How do I update/change the connect descriptor for a target RAC database in Cloud Control

    I have Cloud Control 12c Release 3 set up and monitoring many hosts and targets. However when monitoring my RAC (2 nodes), it cannot connect to the database instances (although it shows them as up). I get the message "IO Error: The Network Adapter could not establish the connection". I can see that the connect descriptior is using the vip, rather than the hostname.
    How can I update the connect descriptor within Cloud Control to the correct values?

    Modify the monitoring configuration following the below listed note
    How to Modify/Update Monitoring Configuration of a Target Database or Listener in 12C Cloud Control (Doc ID 1385769.1)

  • How to set a Extent Procedure connection in Net8

    I want use ORDIMAGE,but I don't know how to set extent procedure in Net8. Is it necessory? And I how to set it?
    Thanks.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by [email protected]:
    Are there some other documents about oc4j that you could sent?
    I have been looking on orionserver but the documentation is not complet.<HR></BLOCKQUOTE>
    For Orion, your best bet is not the documentation but to search for your topic via the extensive mailing list. It is quite active and discusses such topics as pooled connections...also for other sorts of information, look at www.orionsupport.com and www.jollem.com.

  • How can I speed up the connection to the database?

    I am running a JSP application with regular JavaBeans not EJB and connecting to the database through these beans. The connection is set to stay in memory as long as the bean is in session. However when I am running more than 7 sql statements seperatly the execution of the page slows down.
    I have tried using connection pooling but doesn't help much.
    I am not using the JDBC setting in JRUN, I am connecting through the jdbc.odbc drivers provided by the JDK. Basically coded the connection and the connection pool.
    Is there something else that can be done to speed up the execution of the page?
    Thanks in advance

    Thank you all for your input I was trying to work this project to learn JSP so I am not looking at purchasing any drivers right now. That is the reason why I stuck to the JDBC-ODBC Bridge. Are there any other drivers available for MS SQL Servers that are free.
    Jschell,
    That suggests you are taxing the system. It could be >connections. It could also be network, cpu, bus, etc. It >could also be memory, if your app starts swapping to >the hard drive it will get substantially slower.How can i figure out which of the above (i.e. memory, cpu, connections, network) are causing the problem.
    (Presumably you explicitly close your >ResultSets/Statements/Connections when you are >done with them.)You are right about that yes I am closing them at the end of the session, which I think should be after all of the SQL's get executed but I could be wrong it might be openeing a new connection for each SQL which inturn might be the reason for this whole problem. I will take a look into that.
    Thank you all once again.

  • How to set my Firebox email connection? Must I use explorer?

    I AM A NEW CUSTOMER OF FIREBOX.
    I WANT HELP IN SETTING A FIREBOX HOME PAGE FOR LAMPMAN99 /
    My previous browser was Internet Explorer: I DO NOT WANT INTERNET EXPLORER,
    ... I DO WANT FIREBOX BROWSER WITH A FIREBOX EMAIL ADDRESS CONNECTION
    FOR [email protected]
    Do I have to add something to identify myself as [email protected] ??
    I am keeping my old email browser with my old (OTHER NAME ) email address.
    I do not know how to set my pc up for this new FIREBOX SYSTEM.
    HOW WILL I GET YOUR REPLY IF I CANNOT ACCESS MY FIREBOX EMAIL...
    my other email address is [email protected] [email protected]
    My FIREBOX email is: [email protected] ( I HOPE AND I THNK ???)

    Check hete
    *http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • How to set proxy for the programme

    Hello Everyone
    I am learning Java Network programming. My connection to Internet has a proxy. When I use URL class to download the information from Internet, it cannot work. I think maybe I have not set the proxy in the programme. Does anybody know how to set it?
    Best wishes
    Aaron Cui Lu

    System.getProperties().put( "proxySet", "true" );
    System.getProperties().put( "proxyHost", "proxyMachineName/IP" );
    System.getProperties().put( "proxyPort", "proxyPort" );

  • Iphone 5s mail set up error - The connection to the server failed

    I've had hotmail, gmail, and exchange gmail set up on my new iphone 5 and now 5s but the 5s will not connect with my any of the accounts. I'm hoping to keep the exchange gmail and calendar since they were set up before the support was dropped. How do I regain connection to the mail servers for all accounts? Error message says: Cannot Get Mail - The connection to the server has failed. If I delete the accounts and add them back will I lose support to sync gmail through exchange??? Please help!!!

    Contact the email provider to troubleshoot the issue.
    Does any other feature of the device that requires Internet access work?

  • How to set IPC JCO user  connect to CRM system via 'group'?

    Dear expert,
    When we do XCM setting for IPC JCO connect, we input the server address directly in 'ashost',  such as ashost = dga107.ndpaper.com. However, for CRM server, we have two instance, 107 and 108. Does that mean JCO user will only logon instance 107? Does that mean order will only creat in 107, no order in 108?  can we have do some some settings to enable a group logon for the JCO user?
    i noticed for base config, there is 'group connect' in dropdown list,how can i config XCM in the group way? is there any instruction?
    Thanks~
    Hedy
    Edited by: Ye Zhang on Nov 3, 2011 4:27 AM

    Hi Ying
    I'm pretty sure there is a way but I can't check it right now.
    We have such systems where this is set the way you would like it to be, but those are connected to a CUA (central user administration) so the possibility
    does exist for regular Dialog users.
    Unless it is valid for all users in the systems (which is very likely) that way only admin's in the CUA have authorization to change the password and synchronize it.
    Service users is indeed what you are looking and most likely the best solution.
    Kind regards
    Tom
    Edited by: Tom on Feb 1, 2008 10:35 AM

Maybe you are looking for

  • Minimize cmd window

    Hi, Oracle database 10g. Oracle Form 10g. I am using webutil to execute this command : Client_host(' CMD /C ipconfig > c:\IPAddress.Txt', No_Screen); But when i run this statment the cmd screen come in front of me. if we can't hide this screen is the

  • Webmai: doesnot work in Firefox: Itworks in Safari and Chrome----------

    Hello: I can't get into my email using firefox: I have no issues using Safari or Chrome my webmail is : mail.officecomforts.com

  • SEQUENCE Object for Small Tables Only?

    QUOTE from a recent thread: "Long term solution should be to use SEQUENCE with NO CACHE for small tables instead of identity and benefit from performance improvement for large tables." Thread: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c

  • HT1338 Upgraded to Lion. IWork does not work. How do I fix this?

    I increased the size of my hard drive to 1TB and upgraded from Snow Lepord to Lion.  iWorks 09' (keynote, pages, numbers) and iPhoto do not work.  I have used software updated and everything is current. Is there a patch of something else I need to do

  • Strange issue with addTextListener

    Here is my code Class1 implements TextListener: TextFiled txtComp = new TextFiled(""); void TextValueChanged(event){ System.out.println("Reaching here"); Class2: populateFileds(){ txtComp.setText("sample"); Class1.txtComp.addTextListener(Class1); ===