How to enable database access from Java or CSharp ?

I set up an Oracle Express database on my local computer.
Now I want to connect to this databsee from a CSharp (or Java) program.
How do I have to specify the connection string?
The following does NOT work:
connectionstring = "Data Source=XE;User Id=karl;Password=mypassword";
connection = new OracleConnection(connectionstring);
connection.Open();
I am getting an error
"Invalid argument" ORA-12532 error
How do I have to specify the connection string otherwise ?
Is the sequence of the parameter Data Source, User Id and Password
important ?
How do I get a more detailed error message from Oracle ?
Do I have to enable the accessibility from outside programs
in Oracle somewhere ?

about to the error:
ORA-12532 TNS:invalid argument
Cause: An internal function received an invalid parameter. This message is not normally visible to the user.
Action: For further details, turn on tracing and re-execute the operation. If the error persists, contact Oracle Support Services.
Regards

Similar Messages

  • Any ideas how to execute a .sql file on database server from java?

    Any ideas how to execute a xyz.sql file (which is fisically on
    database server) from java?
    thanks

    Try
    sqlplus "sys/oracletest as sysdba" @bpk.sql
    Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
    Remember to put an exit at the end of the bpk.sql script.

  • How to set iframe src from java dynammically

    Hi,
    Iam calling a servlet from jsp and servlet calls the databse query and returns the value,
    in my jsp i have ifrme, i want to change the source of iframe from java depends on the result from database , and the result must display on the iframe can any one tell me how to do this

    aurelian_cl wrote:
    I need to know how to set environment variables from java
    I want to set from java for example the environment variable "TestVar" with the value "TestValue"!1) That functionality does not belong in an application. You're trying to set environment variables, which are global across all applications, at either the user level as a whole, or across the entire machine (system level). Or, if you're only trying to set a variable active for the current process, you don't need to do that.
    2) Environment variables are not a platform-independent entity, and are thus against the nature of Java.
    My gut feel is that you are designing something in a backwards way, so my point is mainly to point that out, not to try to help you solve that particular problem.

  • How to enable user sets from tools in sales order

    Hi,
    How to enable user sets from tools in sales order..it is greyed out..
    and is there anyway we can do to add shipsets from other place?
    Thanks

    Hi Ruchi
    I hope u had gone to the screen fields which u want them not to be editable. So there u select all the fields contents which u do not want to to be changed and check the boxes with W.content and Display and save it. Once evrything is done u have to activate the particular transcation going in to the standard variants and put the name and click the activate button.
    Hope its clear
    Reward if help ful
    Sri

  • How to create database link from oracle to sql server

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal
    Hi Vishal,
    I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
    https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
    We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
    Regards,
    Elvis Long
    TechNet Community Support

  • How to enable private mode from commandline, with an URL. I am a software dev and I wish to have my application open links in Firefox. Using ShellExecute(), i c

    How to enable private mode from commandline, with an URL.
    I am a software dev and I wish to have my application open links in Firefox.
    Using ShellExecute(), i can do with with commandlines like:
    firefox.exe http://support.mozilla.org
    But I also want the option to open the link in private mode.
    I am able to start firefox in private mode by doing this:
    firefox.exe -private
    However, if I add a link to the command line
    firefox.exe -private http://support.mozilla.org
    I get strange results.
    If firefox is not running, it launches 2 copies of the application.
    One that opens in private mode and the other opens in normal mode and goes to the URL specified.
    If firefox is already running, it just opens the URL in a new tab.
    No private mode instance is launched.
    Am I using the command-line syntax incorrectly?

    It will never work if Firefox is already running as Firefox will use the already opened Firefox instance.<br />
    In that case only using a separate profile will work.
    You can try to specify the -url switch as well.
    *firefox.exe -private -url http://support.mozilla<i></i>.org
    You can also look at the -new-tab switch.
    *firefox.exe -private -new-tab http://support.mozilla<i></i>.org
    *https://developer.mozilla.org/en/Command_Line_Options

  • How to Create adf table from java bean

    Hi,
    How to Create adf table from java class (Not from ADF BC).
    Thanks
    Satya

    @vlsn -- you have to follow what shay said.
    Do the following in Model layer ::
    create a table property java class with your columns setters and getters like :
    *public class gridProps {*
    private int sno;
    private String orderNum;
    *public void setSno(int sno) {*
    this.sno = sno;
    *public int getSno() {*
    return sno;
    *public void setOrderNum(String orderNum) {*
    this.orderNum = orderNum;
    *public String getOrderNum() {*
    return orderNum;
    Create another table java class which will populate the values to your column values and return the collection :
    *public class gridPopulate {*
    private  List<gridProps> gridValues ;
    *public List<gridProps> setToGrid(ArrayList<ArrayList> valuesToSet) {*
    *if (valuesToSet == null) {*
    return gridValues;
    gridValues = new ArrayList<gridProps>();
    if(btnValue.equals("completeBtn"))
    return gridValues;
    for(ArrayList<String> tempArr:valuesToSet)
    gridProps gp = new gridProps();
    gp.setSno(Integer.valueOf(tempArr.get(0)));
    gp.setOrderNum(tempArr.get(1));
    return gridValues;
    Right click gridPopulate class and create this as data control.This class will be seen in Data control list.Under this data control,Drag the grid property collection(created earlier) to your page.Then execute your binding(gridPopulate) according to your logic.
    Thanks.(My jdev version 11.1.1.5.0)

  • How to execute Linux command from Java app.

    Hi all,
    Could anyone show me how to execute Linux command from Java app. For example, I have the need to execute the "ls" command from my Java app (which is running on the Linux machine), how should I write the codes?
    Thanks a lot,

    You can use "built-in" shell commands, you just need to invoke the shell and tell it to run the command. See the -c switch in the man page for your shell. But, "ls" isn't built-in anyays.
    If you use exec, you will want to set the directory with the dir argument to exec, or add it to the command or cmdarray. See the API for the variants of java.lang.Runtime.exec(). (If you're invoking it repeatedly, you can most likely modify a cmdarray more efficiently than having exec() decompose your command).
    You will also definitely want to save the returned Process and read the output from it (possibly stderr too and get an exit status). See API for java.lang.Process. Here's an example
    java.io.BufferedReader br =
    new java.io.BufferedReader(new java.io.InputStreamReader(
    Runtime.getRuntime().exec ("/sbin/ifconfig ppp0").
    getInputStream()));
    while ((s = br.readLine()) != null) {...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to call gnuplot command from java

    Hi there,
    In our course, we are required to develop an GUI for gnuplot. In case you don't know about gnuplot, it's a plotting program and has lots of command. We want to use java and swing, but now we don't know how to call gnuplot command from java, or how to execute a shell command(script) from java.
    By the way, since we need read in files with several columns of data and allow user to select a column, we want to use JTable. Is that reasonable?
    Thanks a lot for any suggestions!
    Jack

    Hi, there:
    Will using JTable add much overhead? I may have to use several JTables and switch among them. I can add scroll bar to or edit JTables, right?
    BTW, do you have experience about gnuplot? Can I find the command tree of gnuplot somewhere? Or do you know a better place to post question about gnuplot? unix/linux group, maybe.
    Thanks,
    Jack
    P.S. Would you guys answer my question after I use up my duke dollars? :- )

  • How to invoke BPEL process from JAVA API

    Hi Guys
    Any idea if you can tell me how to invoke BPEL process from JAVA API ?
    What to do in BPEL process manager to achieve that?
    Regards
    Deepak

    See http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/invoke.htm#sthref1373 and the JavaDocs http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/toc.htm.

  • Help! How to convert an instance from java.lang.Object to a particula class

    * How to convert an instance from java.lang.Object class to a particular class
    witch is known only at the running time?
    Roster EJB component is make up of RosterHome, Roster and RosterBean.
    RosterHome is the home interface of Roster EJB.
    Roster is the remote interface of Roster EJB.
    RosterBean is the implement of Roster EJB.
    The following code segment is to invoke Roster EJB component.
    String jndiName="roster.RosterHome";
    javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
    Object objref = initial.lookup(jndiName);
    RosterHome home =
    (RosterHome)javax.rmi.PortableRemoteObject.narrow(objref,
    RosterHome.class);
    Roster myRoster = home.create();
    String team="T1"
    String player="Tom"
    myRoster.addPlayer(player,team);
    But, now, all the home interface, the remote interface and the JNDI Name of
    Roster EJB component are not been known at the compiling time. However They are
    known at the running time, throught reading from the XML config file.
    Questions:
    1,How to write code for this case ? or
    2,How to convert an instance from Object class to a particular class witch is known
    only at the running time?
    String jndiName="roster.RosterHome";// in fact, reads from XML file.
    String homeClassName="roster.RosterHome";// in fact, reads from XML file.
    String remoteClassName="roster.Roster";// in fact, reads from XML file.
    javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
    Object objref = initial.lookup(jndiName);
    Object objHome= javax.rmi.PortableRemoteObject.narrow(objref,
    Class.forName(homeClassName));
    /* how to do next?
    }

    I am not sure what you are trying to do. But at some point you should know which methods to call on the remote interfaces. Maybe the method names are stored in the XML file as well or you have a set of standard method names (also consider parameters).
    However, this can be solved by reflection. Look at the java.lang.reflect package, especially java.lang.reflect.Method, and also at java.lang.Class.
    If you are doing this on the app server:
    I've seen posts where people say that reflection is not permitted in EJB, but I don't think so. Check the EJB spec.
    If you are doing this in an application: reflection is always permitted. Probably also in applets and JSP.

  • How to Link to MATLAB from java?

    Hi
    Anyone knows how to link to MATLAB from java? I am programming in Java (Eclipse) and I want to link to MATLAB.
    Thanks,
    Bing

    Hi, there:
    Will using JTable add much overhead? I may have to use several JTables and switch among them. I can add scroll bar to or edit JTables, right?
    BTW, do you have experience about gnuplot? Can I find the command tree of gnuplot somewhere? Or do you know a better place to post question about gnuplot? unix/linux group, maybe.
    Thanks,
    Jack
    P.S. Would you guys answer my question after I use up my duke dollars? :- )

  • How to move database objects from one user to another user

    Could someone help how to move database objects from one user to another user
    Thanks in advance

    Thanks a lot for the reply.
    Actually I wanted to know whether there is any command to change the owner ship of the table.
    For ex table1 belongs to user1. can the owner of table1 to be changed to owner2.
    directly using an oracle command. I knew that it can be done using import and export, since the table was 200 million thought the rename command would be faster instead of import and export.
    Thanks Billy for letting me know that it is not possible using oracle query.

  • How to terminate an exe from Java

    Hi Everyone
    Can anyone let me know the code to how to terminate an exe from Java
    I run an exe using
    Runtime.getRuntime().exec(dialog); //where dialog is a string (pointing to an exe)
    Now i need to kill this exe
    How do i do this in java
    Any help is highly appreciated
    Thanks!

    getafix14 wrote:
    I run an exe using Runtime.getRuntime().exec(dialog); //where dialog is a string (pointing to an exe)
    Now i need to kill this exe
    How do i do this in java
    ejp wrote:
    Process.destroy();
    And don't forget to take a swig of magic potion first.
    Winston

  • How to Enable Anonymous access to a SharePoint 2013 site e.g for specific site,list etc..

    Hi All,
          I'm working on an extranet and i would like users to be able to fill a form on the site.
    Since i'm going to use sharepoint 2013 how can i configure sharepoint to use both anonymous access and windows authentication at the same time.
    I know for sure it can be done but what can be allowed for anonymous access e.g specific list site etc..
    I would need to make some area available as anonymous e.g a whole site as  i would like to brand it a little to host the form.Any tips of who has configured similar would be appreciated

    Hi Patrick,
    Thanks for posting your query, Kindly follow the below mentioned steps to enable Anonymous access to a SharePoint 2013 site.
    In Central Administration, under Application Management., click Manage web applications.
    Select the web application you want to enable anonymous access for.
    In the Security group on the ribbon, click Authentication Providers.
    In the Authentication Providers dialog box, under Zone, click Default.
    On the Edit Authentication page, select the Enable anonymous access check box.
    Click Save.
    Close the Authentication Providers dialog box.
    Also, browse the below mentioned URLs for more details
    http://blog.cloudshare.com/2012/10/15/how-to-enable-anonymous-access-to-a-sharepoint-2013-site/
    http://www.sharepoint-journey.com/how-to-enable-anonymous-access-in-sharepoint-2013.html
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

Maybe you are looking for

  • Dynamic Login Environment with LDAP and Database level security.

    JDeveloper 11.1.1.0.1 + ADF BC + ADF RC Hi everyone, We are ready to begin creating a dynamic login environment. We would like to be able to keep security on the database side, instead of in the application layer. We also want to be able to use Oracl

  • Authorization restriction for bank details in FK03

    Hi, Please help me in restricting display of Bank details (payment transactions) in vendor master when we use transaction FK03 or XK03. Thanks, Nitish

  • Everything is deleted on my iphone

    i'm trying to download a new version of microsoft software and restore a new one from itune, but everything from my iphone is deleted....please help me.....thank you very much....good day

  • Ejb deployment in WAS

    hi, i have EJB jar files. if we want to deploy this jar files in to WAS 6.0, we need ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi for JNDI specifications. How can we create these files with out WSAD? can we write manually? plz help me if any one know'

  • How to View Crystal 9 reports using SEAM framework

    Experts, I was wondering if there is a tutorial or posts anywhere that would help me, or at least point me in the right direction, to some development ideas on viewing Crystal 9 reports using a SEAM framework.  Any help would be much appreciated.  Th