How to connect database(MSAccess ) in j2me

hi,
i'm new to j2me. can anyone tell me how to connect MsAccess database with the j2me.and also whether it is possible to connect or else we have to use some other database such as Mysql or oracle.
thanx a lot in advance
regards
laxmi

Not directly. Please use the search, was already asked numerous times!

Similar Messages

  • How to connect database to mobile device

    hi,
    i want to know how can connect my mobile phone to my oracle database. i want to send a sms (student roll number)& want to get the marks of that student.
    what i need prerequisites to do this & what should be the steps to install this .
    thxs

    Super,
    I'm not sure which database version you're trying to achieve this for hence, I'd recommend you to go through the following 10g documentation for further understanding:
    Oracle® Database Lite Administration and Deployment Guide 10g
    http://download.oracle.com/docs/cd/E12095_01/doc.10302/e12089/admdb.htm#BDCBEGFI
    Hope this helps.
    Regards,
    Naveed.

  • How to connect database

    This is my jsp file!(
    Claims Processing: Data Entry
    Created on Apr 18, 2007
    To change the template for this generated file go to
    Window>Preferences>Java>Code Generation>Code and Comments
    package Database;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    @author Administrator
    To change the template for this generated type comment go to
    Window>Preferences>Java>Code Generation>Code and Comments
    public class DataRetriever {
         Connection connection = null;
         public DataRetriever(String jndiName) {
              try {
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   connection =
                        DriverManager.getConnection(
                             "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=HRMS;User=sa;Password=sa");
                   System.err.println("Database connection established AGAIN");
              } catch (Exception e) {
                   System.err.println("Cannot connect to database server - " + e);
         private void getConnection(String jndi) {
              try {
                   Context ctx = new InitialContext();
                   if (ctx == null) {
                        throw new Exception("Boom - No Context");
                   DataSource ds = (DataSource) ctx.lookup("java:comp/env/" +jndi);
                   System.err.println(jndi);
                   if (ds != null) {
                        connection = ds.getConnection();
              } catch (Exception e) {
                   e.printStackTrace();
                   connection = null;
         public ResultSet execSelectQuery(String sql) {
              try {
                   if (connection == null) {
                        return null;
                   Statement s = connection.createStatement();
                   return s.executeQuery(sql);
              } catch (SQLException e) {
                   e.printStackTrace();
                   return null;
         public int execUpdateQuery(String sql) {
              try {
                   if (connection == null) {
                        return -1;
                   Statement s = connection.createStatement();
                   return s.executeUpdate(sql);
              } catch (SQLException e) {
                   e.printStackTrace();
                   return -1;
         public void terminate() {
              try {
                   connection.close();
              } catch (SQLException e) {
                   e.printStackTrace();
    This is the servlet.
    package servlet;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import bean.createClaimsBean;
    public class CreateClaimsServlet extends HttpServlet {
    protected void doGet(
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    protected void doPost(
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    private void processRequest(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException{
    String mySqlJndiName =
    this.getServletContext().getInitParameter("MySql JNDI");
    createClaimsBean cb = new createClaimsBean();
    String bd = request.getParameter("textfield1");
    String pl = request.getParameter("textfield2");
    String pa = request.getParameter("textfield3");
    String bn = request.getParameter("textfield3");
    String d = request.getParameter("D1");
    String ta = request.getParameter("textfield4");
    System.out.println("n");
    cb=cb.registerCreateClaims(bd, pl, pa, bn, d, ta, mySqlJndiName);
    request.getSession().setAttribute("registerCreateClaims", cb);
    request.getRequestDispatcher("/WEB-INF/pages/regsuccess.jsp").forward(request,
    response);
    Lastly it is the java file.
    Created on Apr 19, 2007
    To change the template for this generated file go to
    Window>Preferences>Java>Code Generation>Code and Comments
    package bean;
    import Database.DataRetriever;
    @author Administrator
    To change the template for this generated type comment go to
    Window>Preferences>Java>Code Generation>Code and Comments
    public class createClaimsBean {
         private String billDate;
         private String plans;
         private String panel;
         private String billNo;
         private String dependent;
         private String totalAmt;
         public createClaimsBean(String billDate,String plans,String panel,String billNo,String dependent,String totalAmt)
              this.billDate = billDate;
              this.plans = plans;
              this.panel = panel;
              this.billNo = billNo;
              this.dependent = dependent;
              this.totalAmt = totalAmt;
    @return
         public String getBillDate() {
              return billDate;
    @return
         public String getBillNo() {
              return billNo;
    @return
         public String getDependent() {
              return dependent;
    @return
         public String getPanel() {
              return panel;
    @return
         public String getPlans() {
              return plans;
    @return
         public String getTotalAmt() {
              return totalAmt;
    @param string
         public void setBillDate(String string) {
              billDate = string;
    @param string
         public void setBillNo(String string) {
              billNo = string;
    @param string
         public void setDependent(String string) {
              dependent = string;
    @param string
         public void setPanel(String string) {
              panel = string;
    @param string
         public void setPlans(String string) {
              plans = string;
    @param string
         public void setTotalAmt(String string) {
              totalAmt = string;
         public createClaimsBean{
         public void registerCreateClaims(String mysql, String billNo, String dependent, String panel, String plans, String totalAmt)
         DataRetriever data = new  DataRetriever(mysql);
        String sql= "INSERT INTO claims VALUES (billDate, billNo, dependent, panel, plans, totalAmt)";
        data.execUpdateQuery(sql);
        data.terminate();
    How to connect sql so that i m able to insert new data into the database?
    Message was edited by:
            fatimah rasheed

    Hi Fatimah,
    You are on the right way. You need a DataSource to get Connection to the DB and execute queries through it. Have a look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/15/6d56f65fb59e4db97253c89c5cfefd/frameset.htm">this</a> page for more information on setting up a reference to the DataSource from your Web application.
    The procedure for creating a custom DataSource is described <a href="http://help.sap.com/saphelp_nw04/helpdata/en/bb/69da54d8aedc419d46d9ea074e4d41/frameset.htm">here</a>. You can also <a href="http://help.sap.com/saphelp_nw04/helpdata/en/7f/d84b25d49846819d08e1c8ba03a9cd/frameset.htm">use the default DataSource</a>.
    Hope it helps!
    -Vladimir
    PS. Don't use java.sql.DriverManager directly in a J2EE environment. It is designed for standalone usage in the J2SE environment. The recommended way for J2EE is to go through a <b>javax.sql.DataSource</b> object.

  • How to connect DataBase 9i  with 10g Developer Suit

    Hi Every body , how i connect
    Oracle9i Enterprise Edition Release 9.0.1.1.1 DataBase with 10g Developer Suit ????
    when i'm trying to run my program i just can run it for the first time :( . when i'm
    trying to run it for the second time i receive this msg
    <html> <head> ORACLE FORMS.</head>
    <body onload="document.pform.submit();" >
    <form name="pform" action="http://ABUKARAKI.AHU.EDU.LOCAL:8889/forms90/f90servlet" method="POST">
    <input type="hidden" name="form" value="C:\Documents and Settings\Admin\Desktop\MODULE1.fmx">
    <input type="hidden" name="userid" value="tt/tt@oracle">
    <input type="hidden" name="obr" value="yes">
    <input type="hidden" name="array" value="YES">
    </form> </body></html>

    Create your forms working directory.
    add that path to default.env
    and also edit parameter in formsweb.cfg to point to you main form.
    This way by default when you go to http://ABUKARAKI.AHU.EDU.LOCAL:8889/forms90/f90servlet it will open your main form.
    From main form you can open your other forms.

  • How to connect database(oracle 10g) and retreive values using poral 10

    can anyone help me how to connect to database and retreive values in detail and also please post the sample code if u have any.

    Hello
    Thanks for your reply
    I tried to connect and here is the result: see below
    [oracle@ebstailin 11.1.0]$ sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jul 17 15:35:31 2010
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> CONNECT apps/apps
    Connected.
    SQL>
    But still cannot connect using ORACLE SQL Developer
    thanks

  • How to Connect Database Using Script?

    Hi all,
                    Am using Adobe InDesign CS3. Is there any way to connect database from Adobe InDesign CS3 Scripting (Javascript)? Thanks in advance.
    Regards,
    Mohan

    I don't know javascript so I can't help with that part.
    The system plug in you need is from Actual Technologies : http://www.actualtechnologies.com/ The setup for that is detailed in their instructions. You will probably want to set it up for system-wide access, not by user. I found system-wide access more reliable, fwiw.
    For Applescript I send a command through the Terminal/command line that returns the data from the query.
    Here is Applescript:
    set query to "YOUR DB QUERY"
    set results to (do shell script "echo \"" & query & "\" | iodbctest \"dsn=" & dsn & ";uid=" & uid & ";pwd=" & pwd & "\" | awk '{ if (match($0,\"SQL>\")) {k++; if (k==1) next; if (k==2) exit; } if (k==1) print; }'")
    You can probably do something similar in Javascript. You'll have to parse out the text data returned then. I think there may be plug-ins for InDesign that can directly connect to a database (?). Or some plug-ins like inData can take their data passed from a script as well.
    Chris

  • How to connect database using coding in trigger in forms

    Oracle forms6i
    Hai All
    Is there any possiblity to connect database using coding.
    For example when we open a form and we use some button and write some coding and when we execute a small will appear and we give username,connection identifier and database name.
    Is it any possible there when we create a button and in that button we write coding our database name,connectionid and user and when we exe it will internally connect database Pls tell me..
    Regards
    Srikkanth.M

    use LOGON Procedure
    PROCEDURE LOGON
      (username  VARCHAR2,
       password  VARCHAR2);
    logon('scott','tiger@orcl');Mr.Srikkanth.M if u dont close ur old questions dont expect others to answer ur question everytime......so plz remember if u think the person's answer is helpful or correct mark it accordingly
    Thanks :)
    Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • How to connect to MSaccess with sqlplus provided in oracle11g

    With an old sqlplus (version 3.3.4) I was able to connect successfully to MSAccess database using these parameters:  
              SQLPLUS username/password@odbc:myDSNtoMSAccess
    When using sqlplus provided in oracle11g (version 11.2.0.1) with the same parameters, I have this error message:
              ORA - 03121 : no interface driver connected - function not performed
    Can someone can help me?
    Thank you

    Sorry for taking so long to answer you, I'm back to work.
    Thank you all of you for your responses. Let me explain the situation:
    We develop software that need to store data in diffenrent kind of database. Most common one used by our client are MSAccess, SqlServer and Oracle. One of our client is forced to upgrade their Oracle 8i database to 11g. This client received a lot of small MSAccess database from their clients and after the validation of the MSAccess data, copy their content into Oracle. With Oracle8i and SQLPlus 3.3.4 we develop a SQL script to copy the data. The client need to login to is Oracle database using SQLPlus and run a script file that contain the following SQL procedure:
        COPY FROM username/pw@odbc:myDSNtoMSAccess INSERT tablename USING select * from tablename;
    We develop an application that do the same job and much more, but the client is an old fashion guy who only beleive in SQLPlus tools. Given that «the customer is always right», we recreate their Oracle environement with a server on which we installed the Oracle 11g database and a workstation on which we installed the Oracle client. We import successfully the dump file create with Oracle8i, and try some SQL request from the workstation with SQLPlus successfully. Our softwares were adjusted, recompiled and test successfully with Oracle 11g. The only thing that doesn't work is the login to MSAccess with SQLPlus. I think that Justin Cave is right «If memory serves, the ability to use SQL*Plus to connect to ODBC data sources was removed a long, long time ago». After some search and reading, the closest solution would be to use the Oracle gateway but it will be difficult to the client to use it because they will have to rename the MSAccess database and copy it on the specific path create with the ODBC on the Oracle server. This can be done easily, but different MSAccess database has to be validate and copy into Oracle by different user and this can happen in the same moment. So the gateway is not the solution.
    To be honest with you, we are not disappointed. The client will not have the choice to drop SQLPlus and use our application!!!
    Thank again to all of you and please excuse my english.

  • How to connect database using JSF??

    When I deployed a JSF war file which was connected to MySql on Sun Application Server, then lanuched it, why there was an error message like "HTTP Status 503 - This application is not currently available". Can anyone tell me why? thanks.

    Thanks pringi~~!!
    I still have problems about the database connection. I had tried many examples which were provided by some books. However, once I deployed the application, it still got problems. Can anyone help me and provide a example about the database connection. Thanks a lot.

  • How to connect database using JDBc?

    Hi All,
    I developed one Microsoft Access Database named "Test.mdb" in my "C" drive,
    i used
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbc:odbc:C:\Test";
    Connection con=DriverManager.getConnection(url);
    While executing the above code, I m getting the following error
    Error occurs java.sql.SQLException : No suitable driver
    please help me what is the problem..i did code in proper try catch block ... so dont worry but let me know what is exactly reson behibd getting this querry....
    my email id is : [email protected]
    waiting for ur reply.. its urgent

    While executing the above code, I m getting the following error
    Error occurs java.sql.SQLException : No suitable driverDon't post your e-mail.
    This error always means that the URL you gave to connect to the database is incorrect. Yours is indeed wrong:
    String url = "jdbc:odbc:C:\Test";You can correct it in either one of two ways:
    (1) Create a DNS in Windows that points to your database (call it "Test") and change the URL so it says
    String url = "jdbc:odbc:Test";(2) You can skip creating a DNS and use a connection String that looks like this:
    "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=<database-path>";In your case, <database-path> is "C:\\Test"
    Better read a tutorial:
    http://java.sun.com/docs/books/tutorial/jdbc/
    %

  • How to connect database using oracle SQL developer

    Hello
    I am newbie in EBS R12
    I downloaded Oracle SQL Developer
    and create new database conenction
    Connection name: ebs demo db connection
    username:
    password:
    Role: Default
    Connection type: Basic
    Hostname: ebstailin.demo.com
    Port: 1521
    SID: clone
    when i try this there is an error
    Status: Failure-Test failed: lo exception: The Network Adapter could not establish the connection
    no idea about this
    but i used the apps/apps as username and password
    please help
    thanks
    Edited by: cheesewizz on Jul 16, 2010 11:35 PM

    Hello
    Thanks for your reply
    I tried to connect and here is the result: see below
    [oracle@ebstailin 11.1.0]$ sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.7.0 - Production on Sat Jul 17 15:35:31 2010
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> CONNECT apps/apps
    Connected.
    SQL>
    But still cannot connect using ORACLE SQL Developer
    thanks

  • How to connect database using type4 driver(dsn or dsnless connection)

    please send any one reply answer

    One reply - not possible.
    DSN/DSNless refers to a specific driver. And that driver is not a type 4 driver. So it is not possible.

  • Help how to connecting Oracle SQL Developer 3.0  with Oracle Database 11g

    Hello,
    I'm new in oracle developer yesterday i setup in my laptop database 11g the last version (11.2.0.1.0), well i follow steps still i got succeed to install, and i got my local host URL and i test my user name and password work very well, my problem now is i try to connect database 11g using Oracle SQL Developer 3.0 (3.0.04.34) but always filed and with my little experience i don't know where the wrong. as i said i test database after finish install is work fine the my URL is https://Ahmed-HP:1158/em and i test my username and password that i already set before is enter normal in my local database, please i need help to know how i connect database with Oracle SQL Developer 3.0 (3.0.04.34).
    Thanks,

    885173 wrote:
    EdStevens, thanks for your quick answer, sorry for my explain was doesn't clear, i open oracle sql developer and choose new connection i set connection name system_orcl username:system password:*i set my password that i create when i setup database*
    -Now the link that i got after finish install database is https://Ahmed-HP:1158/em so i have question about this point Hostname and port if the link to access database is this https://Ahmed-HP:1158/em so this mean i typing at Hostname:localhost and port:1158 ?
    because the message when i test connection always is filed and I'm sure i typing username and password and SID:orcl as i set when install database.port 1158 is what the dbcontrol (Oracle Enterprise Manager) is listening on. OEM is NOT the database. As far as the database is concerned, OEM is "just another client".
    Actually, the database doesn't listen for requests on any port. There is another process, the "listener" that listens for requests to connect to the database. Typically, it listens on port 1521. You should have a tnsnames.ora file set up to resolve a connection request to the correct host. You can read more on this at http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/

  • 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 a remote database in a lan??

    Hey guys......! I need to connect to a remote msaccess database in a lan and import its data into my mysql database.I know how to connect to a msaccess database using ODBC.But I don't know how to connect to a remote database without creating dsn in the machine where database is.One thing more...I want to know, how can I import data into my mysql database?? Is there any query for that or simply I have to select data from msaccess database and insert into tables of my database??Please, send me the source code in the forum itself and explain also.This is the last feature of my project.So I need to do it as soon as possible.

    If the mdb file in LAN, Just map the network drive.[Windows Explorer/Tools/Map Network Drive] in your system from which we need to access the remote mdb. Then go to ODBC Data Source Admin.. and create a new data source[Microsoft Access Driver] . After clicking the Select button, you will find a Network Drive will be visible on your Drives drop down. Select the map Drive, If not visible then just click the Network button there and map the network path where the mdb files reside. And use the JdbdOdbcDriver class to connect from java.

Maybe you are looking for