How to setup my c# command line application to a remote oracle database?

Hi all,
I will like to ask, how do I setup my C# program to be able to connect to a remote oracle database?
More information:
- I have an oracle database express version running on my PC.
- I am able to run and get data from the database on the same PC.
- But when I bring my application over to another PC within the same LAN. It does not run and given me an error stating "The provider is not compatible with the version of Oracle client".
What do I need to do on the Client PC so that I am able to communicate back to the server database?
Many thanks!

This is the XE forum, not the .NET programming forum, but this might be helpful:
http://www.codeproject.com/Articles/18692/Instant-Oracle-Using-C

Similar Messages

  • Command line applications

    Hi,
    does anybody know how to create a class that represents a command line application that would use a previously created class's methods and variables?
    Jamie

    Is this what you're after?
    You can compile these 2 together as is with InUser.java - though better to compile the class In.java seperately then you will be able to use it elsewhereimport java.io.*;
    // Note: this class has NO "main()" so it cannot work alone
    class In{
       private static InputStreamReader isr = new InputStreamReader(System.in);
       private static BufferedReader in = new BufferedReader(isr);
       public static void prompt(String s) {
          System.out.print(s);
          System.out.flush();
       public static String getString(){
          String str = null;
          try {
             str = in.readLine();
          catch (IOException e){
             System.out.println("Error: In.Read() "+e.getMessage());
             System.exit(0);
       return str;
       public static int getInt(){
          int ii = 0;
             try {
             ii = Integer.parseInt(in.readLine() );
          catch (NumberFormatException nfe){
             System.out.println("Error: the number is not convertable to an int");
          catch (IOException e){
             System.out.println("Error: In.Read() "+e.getMessage());
             System.exit(0);
       return ii;
       public static double getDouble(){
          double dd = 0D;
             try {
                dd = Double.parseDouble(in.readLine() );
             catch (NumberFormatException nfe){
                System.out.println("Error: the number is not convertable to a double");
             catch (IOException e){
                System.out.println("Error: In.Read() "+e.getMessage());
                System.exit(0);
       return dd;
    // And the user with file with a main signature:
    public class InUser{
       public static void main(String[]args){
          System.out.println("\nExample 'In.java' with Readln:");
          In.prompt("Please enter your name: ");
          String name = In.getString();
          System.out.println("Welcome "+name); 
          In.prompt("Please enter a whole number: ");  
          int ii = In.getInt();
          System.out.println("The number squared is "+(ii*ii)); 
          In.prompt("Please enter a fraction number: ");  
          double dd = In.getDouble();
          System.out.println("The numbers square root is " +Math.sqrt(dd));    
    }

  • How to set SAXParser at command-line interface to create a large XML file

    Hi,
    I am trying to create a large XML file (more than 50 MB) by selecting from Oracle database but failed because of "out of memory" error. According to "Oracle XML Developer Guide", we should use SAXParser to parsing a large XML file. But there is no example to show how to set SAXParser at command-line
    Following is what I use to get xml files. It works only when the file is small.
    java OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    When I set SAXParser at the way below,
    java oracle.xml.parser.v2.SAXParser OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    it failed with the error message: "In class oracle.xml.parser.v2.SAXParser: void main(String argv[]) is not defined"
    Does anyone know how to solve the problem? I'll be appreciated very much for your help.
    Yi

    here are my ideas.
    register the xml schema.
    using xmldom, generate the desired xml output and return as xmltype.
    then you can use something like this to check.
    declare
    xmldoc xmltype ;
    begin
       -- populate xmldoc from you xmldom function
       -- validate against XML schema
       xmldoc.isSchemaValid(schema_url, root_element);
       if xmldoc.isSchemaValid = 1 then
            --valid schema
       else
            --invalid
       end if;
    end

  • How do you put a command line in adobe illustrator?

    how do you put a command line in adobe illustrator?

    Your question makes no sense. What exactly are you trying to do?

  • How can I use srvctl command line for change "Failover type" and "F method"

    Hi all,
    I am using Oracle One Node (11.2.0.3), and I have a service:
    /u01/11.2.0/grid/bin/srvctl config service -d orcl
    Service name: orcldb
    Service is enabled
    Server pool: orcl
    Cardinality: 1
    Disconnect: false
    Service role: PRIMARY
    Management policy: AUTOMATIC
    DTP transaction: false
    AQ HA notifications: false
    Failover type: NONE
    Failover method: NONE
    TAF failover retries: 0
    TAF failover delay: 0
    Connection Load Balancing Goal: LONG
    Runtime Load Balancing Goal: NONE
    TAF policy specification: BASIC
    Edition:
    Preferred instances: orcl_1
    Available instances:
    I would like to change "Failover type" and "Failover method" to:
    Failover type: SELECT
    Failover method: BASIC
    How can I do that? Is there any graphical tool for it? Or, How can I use srvctl command line for change it?
    Thanks in advance.
    Leonardo.

    user10674190 wrote:
    Hi all,
    I am using Oracle One Node (11.2.0.3), and I have a service:
    /u01/11.2.0/grid/bin/srvctl config service -d orcl
    Service name: orcldb
    Service is enabled
    Server pool: orcl
    Cardinality: 1
    Disconnect: false
    Service role: PRIMARY
    Management policy: AUTOMATIC
    DTP transaction: false
    AQ HA notifications: false
    Failover type: NONE
    Failover method: NONE
    TAF failover retries: 0
    TAF failover delay: 0
    Connection Load Balancing Goal: LONG
    Runtime Load Balancing Goal: NONE
    TAF policy specification: BASIC
    Edition:
    Preferred instances: orcl_1
    Available instances:
    I would like to change "Failover type" and "Failover method" to:
    Failover type: SELECT
    Failover method: BASIC
    How can I do that? Is there any graphical tool for it? Or, How can I use srvctl command line for change it?
    Thanks in advance.
    Leonardo.srvctl modify service -d database_name -s orcldb -q TRUE -m BASIC -P BASIC -e SELECT -z 180 -w 5 -j LONG
    Also see
    11gR2(11.2) RAC TAF Configuration for Admin and Policy Managed Databases [ID 1312749.1]

  • How can I deploy by command line on AS 10.1.3?

    I have used oracle AS 10.1.3.
    I have created ear file from command line.
    But I don't know how i can deploy by command line?
    However i can deploy from Web manage.
    So, Please tell me How i can deploy by command line when i want?
    Thx

    Hello,
    In OracleAS 10g R3 (10.1.3.x) you can deploy by command line using the admin_client.jar utility, that is exposed also as Apache Ant tasks. In 10.1.3.x you can use the same tool to deploy in a single stand alone OC4J instance to a multi-nodees cluster managed by OPMN.
    Here the documentation about this utility:
    - Deployment Guide
    - Deploying with the admin_client.jar Utility
    -Deploying with the OC4J Ant Tasks
    Regards
    Tugdual Grall

  • KeyListener for a command line application

    Hi, I'm currently writing a small command line application aimed at interacting with a database. I would like to implement features such as an automatic completion of the names with the TAB key. My problem is that the objects that sends KeyEvent are AWT components, and they do that when they have the focus. So I was wondering if any of you had already done such a thing. Until now, I tried lots of things, but there is no way I can catch a KeyEvent within the command line...
    Souk

    Write your own input routine that internally reads a character at a time instead of a complete line or string and test the character for tab etc. and take the appropriate action. This also means you will have to/can implement editing keys.
    If there is a Java class that has an dictionary to compare input with I do not know, because the last time I wrote a tool without gui was in 1985.
    Regards
    SH

  • Telnet Server or Command Line Applications

    Hi,
    Bit of a random question to ask seeing as no one has asked it before...but...
    Is there a TELNET SERVER or command line application around for the N series phones? I'm keen on doing some console work with my N82 to explore the symbian interface more.
    Any ideas?
    Owned: Nokia 3510i, Nokia 3120, Nokia 6230i, Nokia 6233, Nokia N73, Nokia N82.
    Current: Nokia N900!

    24-Mar-2008 02:25 PM
    psychomania wrote:
    This has been posted a few times recently for other models and I think someone posted a link to a useful app that works.
    Are you sure of this, Psycho?
    I've seen links to telnet and ssh CLIENTS for S60 here, not for servers.
    Message Edited by grschinon on 24-Mar-2008 02:38 PM
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

  • Can the command line application be extended?

    I would like to add command like keys etc..Is this possible?

    Correct me if I am wrong, from what I understand, beanShell is a scripting language which interprets the Java language. Yes, I could connect to coherence cache and run any commands I want. However, that won't include the commands which are already prefined in the tangosol command line, would it?
    If I am wrong, I would appreciate if you could show me an example of beanShell and the command line application.

  • Hi, I don't know how to find a specific security patch to apply to my Oracle database version to fix a vulnerability

    Hi, I don't know how to find a specific security patch to apply to my Oracle database version 11.2.0.2.0 (on windows server 2003 32 bits) to fix the following vulnerability:
    Risk: High
    Application: oracle_tnslsnr
    Port: 1521
    Protocol: tcp
    Synopsis:
    It is possible to register with a remote Oracle TNS listener.
    Description:
    The remote Oracle TNS listener allows service registration from a remote host. An attacker can exploit this issue to divert data from a
    legitimate database server or client to an attacker-specified system.
    Successful exploits will allow the attacker to manipulate database instances, potentially facilitating man-in-the-middle, sessionhijacking,
    or denial of service attacks on a legitimate database server.
    Solution:
    Apply the work-around in Oracle's advisory.
    Thank you for your help

    2835604 wrote:
    Hi, I don't know how to find a specific security patch to apply to my Oracle database version 11.2.0.2.0 (on windows server 2003 32 bits) to fix the following vulnerability:
    Risk: High
    Application: oracle_tnslsnr
    Port: 1521
    Protocol: tcp
    Synopsis:
    It is possible to register with a remote Oracle TNS listener.
    Description:
    The remote Oracle TNS listener allows service registration from a remote host. An attacker can exploit this issue to divert data from a
    legitimate database server or client to an attacker-specified system.
    Successful exploits will allow the attacker to manipulate database instances, potentially facilitating man-in-the-middle, sessionhijacking,
    or denial of service attacks on a legitimate database server.
    Solution:
    Apply the work-around in Oracle's advisory.
    Thank you for your help
    that sounds like the "tns poison" vulnerability.  CVE 2012-1675 - Oracle Security Alert CVE-2012-1675
    See MOS note 134083.1  and 1453883.1

  • What commands used for taking backup of oracle database using BR*Tools

    Can somebody please help me urgently to know what are the commands used for taking backup of oracle database using BR TOOLS.Also specifythe commands in detail which can be used for taking backups of oracle database ,Online Redo log files in databse using BRBACK tool,Archiving of offline, redo log files using BRARCHIVE, and Restoring a Database using BRRESTORE tool Commands(Plese specify the commands with their Syntax used).Also specify the commands with their Syntax which are used for taking backup of oracle database(online,Offline redo log files) into Tapedrives using BRTOOLS commands.
    Thanking You for helping (in advance).

    Dear Ashish,
    BRBACKUP / BRARCHIVE calls the operating system command to copy the files.
    Simple approach to get the commands is as follows.
    1. Set the BR_TRACE (as given in the SAP note 29321) and run the command for which you need to know the OS / SQL commands.
    2. This will generate the log file with the trace information. This trace has the information of the commands used by the job you have run.
    Hope this helps.
    Regards,
    Madhukar

  • Develop a command-line application using LabVIEW

    Hi,
             Is it possible to generate a command line(CLI) executable using LabVIEW? This CLI exe will be called with certain command line arguments by another application (written in Visual Basic). The LabVIEW Run time engine can be installed separately on the host PC.
    Thanks for your help
    Siddharth 
    Solved!
    Go to Solution.

    There is an example that ships with LabVIEW that shows how to read the command line arguements from an application. THe name of the VI is CommandLine.vi. It is extremely basic though. The power of command line arguements really comes from how you define and parse them. I recommend allowing your command line arguements to be order independent and that they require a label. For comand lines I prefer to use a single letter for the label. Full words are nice but then your command line gets very long. For the applications that we write we allow both the '/' (DOS/Windows style) and the '-' (Unix/Linux style) to designate a command line label.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How to use the telnet command line in Labview

    Hi, someone can help me, I need to use a Telnet session in Labview but without using the http protocol, in this application I can only access the Telnet session using command line, here is an example of how I can access:
    From my computer, click on Start, then Run and then type in CMD.
    In the command line enter “telnet 192.168.0.1 5454” (without the quote marks) to bring up a blank DOS screen with a blinking cursor.
    Type “AT” and press the ENTER key, you should receive an “OK” response.
    Type in capital letters “AT+CMAR=1234” (without the quote marks)

    I had a similar situation and here is what I did...
    In MAX (Measurement and Automation eXplorer)
    Select Devices and Interfaces
    Select VISA TCP/IP Resources
    Create a new resource
    Select Manual Entry of Raw Socket
    Enter the IP address and port (23 is the standard telnet port)
    Give it a name. (VISA Ailas)
    Now this "Device" will show up in the VISA drop down just like any other VISA device.
    Use the VISA read and write just like you were communicating through a com port.
    Since Telnet does not have a stop bit like serial, make sure you enable the termination character.
    On your VISA reads set the number of characters to a big number, then VISA will read until it gets the termination character.
    See my attached snippet of my Telnet read vi
    Message Edited by RTSLVU on 06-16-2010 01:49 PM
    Message Edited by RTSLVU on 06-16-2010 01:50 PM
    Attachments:
    telnet.png ‏40 KB
    max1.png ‏33 KB
    max2.png ‏31 KB

  • [RESOLVED] How I pass in my command-line variables disgusts me

    Hello,
    What I'm trying to do is to make an easily configurable script that the user can run with just a few basic command line variables (some of our users are not programmers.)  Now, here's my problem, when it comes to extracting the variables from the command line, it's kind of messy.  Lets say I have the following command:
    $ ./hl_script.sh --config-file=config_abc.txt --rate=5000 --data-dump=/opt/dump_area -v
    "-v" means verbose
    Now, given the weird arrangement of the different types of command line arguments, I'd like to extract the salient parts of the information that I care about.  However, at this moment, all I have is the "cut" command which can easily get into undefined behavior territory should the user misstype an input.  I would love to know how you have done this and what your approach to this problem is.
    This is the code that I have so far:
    # this is where we run the initial test and check if the user entered the
    # help flag in order to see how to properly use this application.
    if [ $# -gt 1 ]; then
    for argument in $@
    do
    if [ $argument = "--help" ]; then
    echo "Here is how you would use this software and the flags that would"
    echo " be useful."
    echo " --help"
    echo " Brings up this display and shows a listing of the options"
    echo " that can be used to better utilize this app."
    echo ""
    echo " --config-file=N"
    echo " Specify the config file that we'd like to use."
    echo ""
    exit 0
    elif [ `cut $argument | cut -d'=' -f 1` = "--config-file" ]; then
    # read-in the config file that we specified and then proceed to set a
    # bunch of environment variables that we need.
    echo "stuff..."
    fi
    done
    fi
    Last edited by publicus (2014-05-13 13:13:43)

    ewaller wrote:
    I know your sample code is Bash, but you may want to consider doing it in Python and using this library
    Here is a simple Python program I wrote that uses the library:
    ewaller$@$odin ~/devel/python 1004 %./sieve.py
    Usage: sieve.py [options] arg
    sieve.py: error: incorrect number of arguments
    ewaller$@$odin ~/devel/python [2]1005 %./sieve.py 10
    2 3 5 7
    ewaller$@$odin ~/devel/python 1006 %./sieve.py --help
    Usage: sieve.py [options] arg
    Find prime numbers using a sieve of Eratosthenes
    Options:
    -h, --help show this help message and exit
    -v, --verbose
    ewaller$@$odin ~/devel/python 1007 %./sieve.py 10 -v
    removing 4
    removing 6
    removing 8
    removing 10
    removing 6
    removing 9
    removing 10
    2 3 5 7
    ewaller$@$odin ~/devel/python 1008 %cat sieve.py
    #! /usr/bin/python
    Implement a sieve of Eratosthenes
    from optparse import OptionParser
    def main():
    #Handle all the command line nonsense. We need a number as an argument
    usage = "%prog [options] arg"
    description = "Find prime numbers using a sieve of Eratosthenes"
    parser = OptionParser(usage=usage,description=description)
    parser.add_option("-v", "--verbose", action="store_true", dest="verbose")
    (options, args) = parser.parse_args()
    if len(args) != 1:
    parser.error("incorrect number of arguments")
    try:
    maxval=eval(args[0])
    except:
    parser.error ("Argument is not a number")
    # Here is the sieve
    a=[x for x in range(0,maxval+1)]
    for count in range(2,int(maxval/2)+1):
    if a[count]:
    for i in range(count*2,maxval+1,count):
    a[i]=0
    if options.verbose:
    print ("removing %i"%i)
    # and report the results
    wrap=0
    for count in range(2,len(a)):
    if a[count]:
    print (count,end=" ")
    wrap += 1
    if (wrap == 5):
    print()
    wrap = 0
    print ()
    if __name__ == "__main__":
    main()
    ewaller$@$odin ~/devel/python 1009 %
    The thing is, I already have some shell code written that works, so I don't want to re-write (and re-test) that.

  • How do I pause C command-line program?

    Hello. I'm writing a little command-line game app in C and I'm curious about how I can pause the program to wait for the user to hit return. I want the user to need to hit return (or having to hit any key would work too) to make the program continue, and I would like the key that was hit not to appear on the screen -- just a simple sort of "hit any key to continue" type thing. In C++ I think we used something like system("Pause") or something like that -- don't really remember, but any help here will be greatly appreciated. Thanks!

    Something like this will print a prompt, then wait for a keystroke:
    printf("Hit any key to continue> ");
    getchar();
    However in a console application, it's not so easy to prevent the user's keystrokes from being echoed. There are ways to turn the echo off for the keystroke then restore it, but those can depend on the environment. I'd need to know whether you're running your program in an Xcode console window, a Terminal window, or elsewhere. In short, don't go there unless it's quite important to you. The above prompt will show any chars that are keyed-in as text after the arrow, which is what a user would expect.
    Hope that helps!
    - Ray

Maybe you are looking for