How to connect java with database without any dsn.

is there any way to connect java with database with out creating any dsn..like we do in ado in vb by providing provider.

Sure use a type 4 driver. No DSN.

Similar Messages

  • How to connect java with oracle

    can any body show me the code of how to connect java with oracle database.
    thank you

    To configure Oracle JDBC:
    1. Add Oracle JDBC JAR file classes12.zip or ojdbc14.zip to classpath.
    2. Load and register the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    3. Obtain a connection:
    String url="jdbc:oracle:thin:@<host>:1521:<database>
    Connection con = DriverManager.getConnection(url,
    "myLogin", "myPassword");
    4. Create a SQL statement.
    Statement stmt = con.createStatement();
    5. Obtain a result set.
    ResultSet rs = stmt.executeQuery(
    "SELECT ...");

  • How to connect Java with Acces (DSN Less)

    Hi, I'm try to connect an Access DataBase in Java with an example. I find it in this forum, but don't work...
    I've my database in the folder Data, and its name is BaseDat.mdb...
    I'm working in NetBeans 5.5, and the DataBase is in the Folder: "C:/Documents and Settings/MetalTux/POOL/src/Data/BaseDat.MDB"...
    This way, its work, but It's another way to use this... without the "C:/Documents and Settings/MetalTux/POOL/src/"????
    Please help me... and sorry my english...
    Regards...

    I have this in my code:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conec = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Documents and Settings/MetalTux/POOL/src/Data/BaseDat.MDB");
    This is OK... work in my code...
    But I want to know if there's another way to do this... without "C:/Documents and Settings/MetalTux/POOL/src" code....
    In Visual Basic I do this with "App.Path", but I don't know how I can do the same thing in Java...
    Please help me...

  • How to connect java with C

    Plz help....
    How to Connect a Java With C ....

    using the JNI, Java Native Interface. there are tons of tutorials on the web about it, that will explain far better and more completely than a few posts on a forum

  • Help!! How To Connect Java & PostgreSQL Database

    I'm final year student in comp sc. I'm doing java in my thesis.
    How to get/read data from postgresql using java?
    My thesis is "2 Dimensional Graph Statistics Online Viewing Using Java Applet". So i need a mechanism how to read data from postgresql database using java programming. Please Help!!

    Hi,
    getting started you need some basics on JDBC.
    Have a look at the tutorials, or look at this site (its german):
    http://www.furchur.de/de/informatik/laborberichte2.htm#dbswt
    Have a look at the java.sql package.
    First you need to build up a connection using
    java.sql.DriverManager.getConnection(...)
    The parameter for the PostgreSQL you must look somewhere.
    After you have a connection you can use Statements and PreparedStatements to get and set data in the database.
    At the end, make sure, the connection will be closed, otherwise data can be lost.
    Hope that will help you a little bit

  • How can connect java with 3D Max

    i want to make 3d maze by reading from text file
    for example when i read 0, then i draw wall
    when i read 1 i draw path ..and so on
    and i want to move the object in the maze by using AI techniques
    my questions are:
    - can I read from file and draw by using 3D Max and program the
    object moving using java, if yes, how can i connect the java and 3D Max
    if there are any resoures, or any other silution may help me
    please tell me about it

    I've found two loaders to load 3ds files, so if you export your models from 3ds max that should work.
    http://www.starfireresearch.com/services/java3d/inspector3ds.html
    http://sourceforge.net/projects/java3dsloader/
    //My hyperlink option doesn't work today
    Hope it helps.
    //Considerate

  • Unable to connect JAVA with Oracle

    I have jdk1.6 and oracle installed on my machine but unable to connect java with database
    have classes12.jar and ojdbc14.jar
    my environmental variables in respect to this are :
    JAVA_HOME= C:\Java\jdk1.6.0_04
    JRE_HOME=C:\Java\jdk1.6.0_04
    PATH=J:\oracle\ora92\lib;
    J:\oracle\ora92\bin;
    C:\Program Files\Oracle\jre\1.3.1\bin;
    C:\Program Files\Oracle\jre\1.1.8\bin
    CLASSPATH=J:\oracle\ora92\jdk\jre\bin\JdbcOdbc.dll;
    J:\oracle\ora92\jdbc\lib\classes12.jar;
    J:\oracle\ora92\jdbc\lib\ojdbc14.jar
    The code is
    import java.sql.*; public class dat1 {               public static void main(String[] args)throws SQLException,ClassNotFoundException {         try     {     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");     Class.forName("com.oracle.jdbc.OracleDriver");     } catch (ClassNotFoundException e) { System.out.println("unable to load driver"); return; }     } }
    the error message is
    Error in thread "main" java.lang.NoClassDefFoundError
    Please Help Me
    Thanks For Reading
    Thanks a lot in Advance For your ANSWERS

    maybe if you asked nicely instead of ordering people around we might tell you.
    As it is all you're going to hear is that you don't need both those jars, as they contain different versions of the same driver.
    I'm not going to tell you which you need, as you should have the documentation to tell you that. But then you also should have the documentation to tell you how to set your classpath properly and you failed to read that too.

  • Connecting JAVA with  Video Card

    Hai,...
    Can someone tell me how to connect Java with a video card (like Matrox, dec-link, etc)?
    Because i want to display a video using that video card to a TV monitor.
    Is there any tutorial about this? and about connecting JAVA with other device?
    Thank you,
    Billy

    Hai,...
    Can someone tell me how to connect Java with a video card (like Matrox, dec-link, etc)?
    Because i want to display a video using that video card to a TV monitor.
    Is there any tutorial about this? and about connecting JAVA with other device?
    Thank you,
    Billy

  • How to connect Java to crystal report

    How to connect java with crystal report ?
    Which are the API's for that

    In all this time you never considered searching?
    Cross post
    http://forum.java.sun.com/thread.jspa?threadID=791154

  • HELP about How to connect with Database without JDBC ?

    Hello all,
    i have oracel8i database and my programe work fine with JDBC
    but now
    i want to connect my programe with database without using JDBC connection please any body tell me syntex for that,
    Class.forName("oracle.jdbc.driver.OracleDriver");
    databaseConnection = DriverManager.getConnection("??","arif","arif");
    i have user arif in my database and my computer name is "ABCD"
    Please help me,
    i m thanksfull,
    onlyforjava.

    Thanks i try it,
    url = "jdbc:oracle:thin:@ABCD:1521:" + sid;
    connection = DriverManager.getConnection(url,"arif","arif");
    but after that i got exception,
    java.sql.SQLException: Protocol violation
    Please help me,
    i m thanksfull.
    onlyforjava.

  • How to connect Java Application with database!

    Dear all, now I am create a dababase application. My database use JData Store. But I don't know how to connect application with it. Can you tell me this proplem?
    Thank!

    Do a google search for JDBC, or go buy a book.
    You will need a JDBC driver which supports your database. Or you might be able to use the JDBC-ODBC bridge if there's an ODBC driver for your database.

  • How to connect Java to oracle Database Express Edition?

    Anyone can help me?
    How to connect JAVA TO ORACLE DATABASE EXPRESS EDITION?

    I suggest you to read this article:
    http://wiki.oracle.com/page/JDBC
    Regards,
    Ricky

  • How to connect JSP with MySql Database?

    HI All...
    I want to know or How to connect Mysql with JSP or JSF any other software is available? please help me.....

    I want to know or How to connect Mysql
    with JSP or JSF any other software isavailable?
    please help me.....First you need to find 25 m of a CatV cable and...The DB files need to be located on the ninth device of a SCSI Daisy Chain with the total SCSI cable length being over 150 m (and the devices (and cables) need to be mix of Differential and Non-Differential).
    Edit: And forget the terminator, who needs it?

  • How to connect portal with msaccess database

    we have to develop oracle portal applications with msaccess as a back end.how to connect portal to access.
    thanks in anticipation.

    I want to know or How to connect Mysql
    with JSP or JSF any other software isavailable?
    please help me.....First you need to find 25 m of a CatV cable and...The DB files need to be located on the ninth device of a SCSI Daisy Chain with the total SCSI cable length being over 150 m (and the devices (and cables) need to be mix of Differential and Non-Differential).
    Edit: And forget the terminator, who needs it?

  • How to connect to SAP Database from a Adobe flex application?

    Hi
    I am an intern currently working on designing an Adobe flex interface that interacts with an SAP Database, although im torn between methods of implementing the most efficient connection without over-complicating the problem. I believe the best approach would be to use SAPJCo but am unfamiliar with how to approach this method and am finding it hard to get detailed documentation or code examples which show connecting to a Database. Another approach would be using a web service but my problems again arise with my lack of knowledge to connect to the Database.
    Any advice or help would be much appreciated.
    Thanks,
    Jonny

    Hi Jonathan.
    I believe webservice is the best approach, steps to create webservice is very simple.
    1. create a webservice from a standard rfc or bapi.
    2. release and activate webservice.
    3. it will generate wsdl file which can be used in flex environment.
    creating webservice.
    http://help.sap.com/saphelp_nw04s/helpdata/en/0d/2eac5a56d7e345853fe9c935954ff1/frameset.htm
    Consuming ABAP Web Services using Flex :
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/emtech/consuming%2babap%2bweb%2bservices%2busing%2bflex
    i hope this surely helps.
    Venkat.

Maybe you are looking for

  • Report for Assets Retirement

    Dear all, I used the report S_ALR_87100623 to manage the retirement and i didn't found an option to display the customer number & description. I need a report on Asset Retirement (similar to S_ALR_87100623) which display the customer number and his d

  • Runtime error with photoshop editor

    A power failure shut down Photoshop Elements organizer and editor.  Now I get a "Runtime Error when I try to open the editor.  What do I do now?

  • WCS report to show duplex on associated AP's

    Is there a report that I can run in WCS to show me the speed and duplex that my AP's are operating at?

  • To display Numer of records in Account Search

    Hi All. I have a requirement in which I have to display the number of records found when I execute a search of the Account (BP). This number is to be displayed against the u2018Result Listu2019. There seems to be some problem with the enhancement tha

  • RollOver handlers issue

    Hello, I have stumbled across the following problem. In flex i have defined (mxml or actionscript, doesnt matter) a group which contains a rectangle kind shape (Spark Path) and a few buttons which are all instances of a self made button component. No