Database package for handling SQL queries using JDBC/ODBC bridge

I perform a package using J2ME which can stores the contact.It consisting of the fascilities of the editing,Inserting, Deleting,Updating records
i have write import statements as
import javax.microedition.midlet*;
import javax.microedition.lcdui.*;
but when i write import java.sql.* error message shown AS this package does not exist.
So for J2ME using J2ME wireless toolkit 2.5 cldc which package i want to import to implement the sql statements i implement the Database using the text Files.
Requirement is that all SQL statements are implemented.also Which other equivalent packages are there for handling the databases in J2ME.
Please tell me all the package & Answer of the above problem.

Hey
I was told that I can (through Java code) read all the registered DSNs and that way basically modify my application to populate it with a list of databases in the system and then when the user clicks on a database, the program would function as before...i.e. read the list of tables with it..yadda yadda yadda
Can anyone guide me on how to do that? read a list of DSNs in the system etc

Similar Messages

  • Is it possible to use Jdeveloper with Other Sql Server using JDBC-ODBC bri

    I have been able to successfully establish connection with Sql server Using JDBC-ODBC bridge, but when i run the application and perform some operations such as insert the following errors occur:
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT ItmUnit.ORG_CODE, ItmUnit.UNIT_CODE, ItmUnit.UNIT_NAME, ItmUnit.ADDRESS1, ItmUnit.ADDRESS2, ItmUnit.ADDRESS3, ItmUnit.CITY_CODE, ItmUnit.USER_ID, ItmUnit.TIME_STAMP FROM ITM_UNIT ItmUnit
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [DataDirect][ODBC Sybase Wire Protocol driver]Sybase does not allow more than one active statement when retrieving results without a cursor
    (oracle.jbo.DMLException) JBO-26041: Failed to post data to database during "Insert": SQL Statement "INSERT INTO IMMS.HRM_UNIT(UNIT_CODE,UNIT_NAME) VALUES (?,?)".
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
    (oracle.jbo.AttrValException) JBO-27014: Attribute DeptCode in HrmUnitDept is required
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT HrmUnit.UNIT_CODE, HrmUnit.UNIT_NAME FROM IMMS.HRM_UNIT HrmUnit
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt

    Yes, you can do that. For testing purposes you can also create simple files (with mkfile) and add these to ASM. That way you could also experiment with deleting files and see what happens in ASM
    Bjoern

  • To run a report from command line, when using jdbc-odbc bridge

    Hi,
    How to run a report from command line, when using jdbc-odbc bridge?
    Usually with tns, we do by "rwrun module=<> userid=<user>/<passwd>@tns".
    with odbc, we do by "rwrun module=<> userid=<user>/<passwd>@odbc:DSN"
    Please specify, what is command line arguments for jdbc-odbc bridge driver?
    Environment : Oracle 9i Report Builder on WinNT
    Database : Sybase
    Regards,
    Ramanan

    Hello Ramanan,
    Report Builder : connect JDBC Query in Report Builder is to through Connection Dialog in JDBC Query Editor. User can use a Sign on parameter (can use, default : P_JDBCPDS or can create new) to connect to JDBC Data Source. Connection once made will be mentioned and will be reused through out Reports Builder.
    JDBC PDS allows user to connect one or more same or different kind of databases.
    While running report through runtime or Server, user can pass the sign on parameter(connection string) value, like any other user parameter.
    Syntax for connection string : <username>/<password>@databaseURL . The syntax of database part of connection string depend on the type of JDBC Driver used to connect to Data Source while designing the JDBC Query. databaseURL refer to the location of the database and its format depend on the JDBCPDS river selected in design time while creating the JDBC Query.
    rwrun eg :
    rwrun report=jdbc_odbc.rdf destype=file desname=output.html desformat=html P_JDBCPDS=scott/tiger@database
    Server eg :
    http://server.com:8888/servlet/RWServlet?server=MyReportServer+report=jdbc_odbc.rdf+destype=cache+desformat=html+P_JDBCPDS=scott/tiger@database
    http :
    Please see ORACLE_HOME/reports/conf/jdbcpds.conf for more information.
    With Regards
    Reports Team

  • Problem using Jdbc-Odbc Bridge

    Hi,
    I am using Java 2 SDK and I am trying to access MS Access database on my machine using Jdbc-Odbc bridge. I have set up the DSN in ODBC. But I get the following error when I run my program -
    'No Suitable Driver'
    Here's my code snippet-
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    String dsn = "jdbc:odbc:DriverInfoDB";
    Connection con = DriverManager.getConnection(dsn,"","");
    con.setAutoCommit(false);
    Statement stmt;
    String query = null; // SQL select string
    ResultSet rs; // SQL query results
    stmt = con.createStatement();
    .....etc etc...
    Where is the error in this code??
    Help Needed!!
    Thanks
    Vivek.

    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(dsn,"guest","guest");
    OR DriverManager.getConnection(dsn);
    System.out.println("Conection's opened");
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    catch(SQLException sqle)
    System.err.println(sqle);
    try that code and double check you DSN Name . it's a good practice to greate a system DSN.
    i hope that helps.
    FEEL FREE TO ASK. WON'T BITE U
    ABDUL

  • Java Web Analyzer security hole in SQL Query Spreadsheet using JDBC-ODBC bridge

    Hi,<BR><BR>I use Hyperion Analyzer 7.0.1 on Windows 2003 and relation database DB2 v8.2.<BR><BR>I did:<BR>1. log in to Java Web Analyzer<BR>2. button New<BR>3. Select Layout: Custom Report<BR>4. from toolbar pull down to desktop "SQL Spreadsheet" option<BR>5. "Enter SQL Query" window opens, from JDBC Driver drop down window select "JDBC-ODBC Bridge"<BR>6. in "JDBC Connection String" window replace "db1" string with database name<BR>7. leave JDBC Username and JDBC Password empty (this is default)<BR>8. click on "Test Connection" button.<BR>9. "Test Connection" window opens with message "Connection Succeded"!!! So connection to database without password succeeded.<BR>10. in "SQL Query window" write any SQL you wish and Database will execute the SQL.<BR><BR><b>Conclusion: Connecting Analyzer with SQL Spreadsheet option to relation database DB2 is possible without password.</b><BR><BR>Question: Is there any way to prevent users from executing "SQL Spreedsheet" option?<BR><BR>Thanks,<BR>Grofaty

    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(dsn,"guest","guest");
    OR DriverManager.getConnection(dsn);
    System.out.println("Conection's opened");
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    catch(SQLException sqle)
    System.err.println(sqle);
    try that code and double check you DSN Name . it's a good practice to greate a system DSN.
    i hope that helps.
    FEEL FREE TO ASK. WON'T BITE U
    ABDUL

  • Null Pointer Exception using JDBC-ODBC bridge on Linux

    Wonder if anyone can help me with this one?
    I am attempting to use the JDBC-ODBC bridge on Fedora with J2SDK 1.4.2_04, however I am getting a NullPointerException whenever I get the connection. I can get the JDBC connection to work but it is a requirement that ODBC be used.
    The code is as simple as it can get.
    import java.sql.*;
    public class TestClass
       public static void doConnection()
          try
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               Connection cn = DriverManager.getConnection("jdbc:odbc:DB");
          catch (Exception e)
               e.printStackTrace();
       public static void main(String[] args)
          doConnection();
    }Running this program using java -verbose TestClass I get the following output.
    [Loaded sun.jdbc.odbc.JdbcOdbc from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.lang.UnsatisfiedLinkError from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.sql.SQLException from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.sql.SQLWarning from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    java.lang.NullPointerException
    [Loaded java.lang.StackTraceElement from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at TestClass.doConnection(TestClass.java:13)
    at TestClass.main(TestClass.java:96)
    [Loaded java.lang.Shutdown from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    [Loaded java.lang.Shutdown$Lock from /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar]
    The UnsatisfiedLinkError suggests to me that a library cannot be found, but I don't know what library.
    As far as I know I have configured ODBC correctly. I can achieve connectivity to my database using other tools and I still get this same error irrespective of whether the DSN is valid or not.
    I have installed the unixODBC rpm.
    Any help/insite would be greatly appreciated.

    This is the output of ldd. Everything appears to be resolved.
    linux-gate.so.1 => (0x00cf5000)
    libodbcinst.so => /usr/sybase/lib/libodbcinst.so (0x001d5000)
    libjava.so => libjava.so (0x008af000)
    libjvm.so => /usr/java/j2sdk1.4.2_04/jre/lib/i386/client/libjvm.so (0x002a7000)
    libc.so.6 => /lib/i686/libc.so.6 (0x00d77000)
    libdbtasks7.so => /usr/sybase/lib/libdbtasks7.so (0x00eb2000)
    libdl.so.2 => /lib/libdl.so.2 (0x00111000)
    libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x00115000)
    libm.so.6 => /lib/i686/libm.so.6 (0x008fb000)
    libverify.so => libverify.so (0x0016e000)
    libnsl.so.1 => /lib/libnsl.so.1 (0x00180000)
    libpthread.so.0 => /lib/i686/libpthread.so.0 (0x006d0000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00157000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00b75000)
    The ODBC is a Sybase driver and is loaded from elsewhere. I will check for any known compatibility issues.

  • Access MS-Access using JDBC ODBC bridge from Sun AMD64

    Hi,
    We are trying to configure a communication channel using the JDBC adapter. We are setting the driver to the JDBC-ODBC bridge driver and trying to access an MS Acess database from the PI server(sun amd64). When we set the driver to the JDBC-ODBC bridge, the J2EE engine tries to restart immediately and does not start. The std_server.out contains the following error:
    Service com.sap.aii.adapter.jdbc.svc started. (234 ms).
    1016 sun.io.CharToByteASCII::convert (370 bytes)
    1017 ! com.sap.sql.jdbc.common.CommonPreparedStatement::close (119
    bytes)
    ld.so.1: jlaunch: fatal: relocation error:
    file /usr/j2se/jre/lib/amd64/libJdbcO
    dbc.so: symbol SQLAllocEnv: referenced symbol not found
    Has anybody been able to configure the JDBC-ODBC bridge driver for MS Access? Also, has anybody used the database vendor(MS) drivers? If so, where are they available.
    Thanks in advance
    Vipin

    Hi
    Please go through below links that would be helpful to you
    SAP Network Blog: Connecting to MS Access using receiver JDBC Adapter (Without DSN)
    /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    If required Try the following driver. I havent used it but its available.
    HXTT Access is such a type 4 driver at http://www.hxtt.net/en/software/access/document.html .
    Thanks
    Swarup

  • Connecting remote FoxPro dbf file using jdbc odbc bridge driver?

    Hi all,
    I am new to this topic, (even I read some threads)
    I need to access some FoxPro tables (dbf files) and select some data and save to an oracle table. what is the best method to do this?
    If I use java as development tool. which other drivers or methods to use beside jdbc-odbc driver?
    I read from this link but I didn't understand.
    http://java.sun.com/products/jdbc/faq.html#5
    "5. How can I use the JDBC API to access a desktop database like Microsoft Access over the network?
    Most desktop databases currently require a JDBC solution that uses ODBC underneath. This is because the vendors of these database products haven't implemented all-Java JDBC drivers.
    The best approach is to use a commercial JDBC driver that supports ODBC and the database you want to use. See the JDBC drivers page for a list of available JDBC drivers.
    The JDBC-ODBC bridge from Sun's Java Software does not provide network access to desktop databases by itself. The JDBC-ODBC bridge loads ODBC as a local DLL, and typical ODBC drivers for desktop databases like Access aren't networked. The JDBC-ODBC bridge can be used together with the RMI-JDBC bridge, however, to access a desktop database like Access over the net. This RMI-JDBC-ODBC solution is free.
    "

    Another solution by using HXTT DBF, a commercial type 4 JDBC package: You should read Remote Access Questions section at http://www.hxtt.net/en/software/dbf/faq.html#remote .

  • Weblogic server using jdbc-odbc bridge

    I want to connect to database through jdbc-odbc bridge.I am using web logic server. When i creating new jdbc connection pool a error comes that driver class is not on classpath. how i rectify this problem? how I make weblogic to recognize sun.jdbc.odbc.JdbcOdbcDriver?

    like any other library...
    put the .jar file of the lib in the WEB-INF/lib of
    your webappWrong in so many ways.
    You don't add drivers to WEB-INF/lib if they're being acquired as datasources - the server needs access to the driver to create the data source. If you're not using a DataSource but materializing the connection directly, then this advice is semi-correct, but it's a crappy way to build a web app.
    You don't normally add a JAR for the Sun JDBC ODBC bridge anyway as it's present by default in their J2SE implementation.
    And finally, I think WebLogic doesn't use the Sun J2SE implementation anyway, so it's possible that the bridge is not available at all.
    So the correct answer is: Don't use the bridge driver. Acquire a driver for your specific database and use that. And make sure that it's available to the application server. If you absolutely must use the bridge driver, you're going to have to use the Sun J2SE implementation to run WebLogic - and I think you'll have to consult the WebLogic site for help with that.

  • Crash of application using JDBC ODBC bridge

    Hello,
    Recently my java application started crashing everyday with this error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f8910e
    Function name=RtlEnterCriticalSection
    Library=C:\WINNT\system32\ntdll.dll
    Current Java thread:
    at sun.jdbc.odbc.JdbcOdbc.allocConnect(Native Method)
    at sun.jdbc.odbc.JdbcOdbc.SQLAllocConnect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.allocConnection(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Terminal.getConnection(Terminal.java:152)
    at CnetworkFile.unloadBuchung(CnetworkFile.java:3049)
    at CnetworkFile.receiveIt(CnetworkFile.java:2693)
    at NACController.OnREQCHN(NACController.java:236)
    at nacmain.processREQCHN(nacmain.java:394)
    at nacmain.access$39(nacmain.java)
    at nacmain$IncommingEvents.run(nacmain.java:113)
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f8910e
    Function name=RtlEnterCriticalSection
    Library=C:\WINNT\system32\ntdll.dll
    Current Java thread:
    at sun.jdbc.odbc.JdbcOdbc.execDirect(Native Method)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source)
    at CnetworkFile$onlineAction.lastBookingInformation(CnetworkFile.java:395)
    at CnetworkFile$onlineAction.run(CnetworkFile.java:1005)
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f8910e
    Function name=RtlEnterCriticalSection
    Library=C:\WINNT\system32\ntdll.dll
    Current Java thread:
    at sun.jdbc.odbc.JdbcOdbc.disconnect(Native Method)
    at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcConnection.close(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcConnection.finalize(Unknown Source)
    at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
    at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
    at java.lang.ref.Finalizer.access$100(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    And the list continues.
    The problem i am facing is that even on old versions of my application that had never had a crash befor now it is crashing !!!
    Please help !
    Time is critical !
    Thank you very much !
    Best regards,
    Mihai

    hmmm..... ntdll.dll
    i would try the following.
    1) reinstall the JVM
    2) reinstall the MDAC (M$ data access components)
    3) re-install NT.
    if you get errors of this type with code that worked before and you haven't changed anything it may just be that some windows files are corrupted and need to be replaced or in the worst case the whole system needs to be re-installed.
    you might want to consider not using the jdbc-odbc driver in future to eliminate MDAC and ODBC as possible causes of problems and errors.
    otherwise welcome to windows. generally i find NT systems need to be re-installed once every 3 to four months on average if you use them heavily.

  • FILE DSN using JDBC-ODBC Bridge ?

    Please Give Me sample code for Making connection
    against a dbms using FILE DSN & JDBC ODBC Bridge

    What do you mean by FILE DSN? Can you be a little more specific?

  • Sql.exception using jdbc:odbc Sqlserver 7

    hi
    i use java jdk 1.3 and sqlserver 7.0 on windows98 and establish a connection over jbc:odbc. I use executeUpdate() statement and insert something to a table. there is a trigger defined and sometimes i got an sql.exception, that no rowcount returned.
    can you help me ?
    thanks jens

    The trigger does a rollback in some cases.
    Obviously - try this out! - this causes that JDBC exception then.
    Now I see a problem in this, that the trigger does rollbacks concering the connection, but your Java program does not know that its connection's actual transaction has been rolled back. Imagine, if you have done several steps before without commitng yet, they are rolled back as well.
    So I would use this only with AutoCommit set to true.
    I think it's not a good idea in general to let a trigger do a rollback. But in this area I have few experiences.
    I assume you have to use this table schema and its trigger definition and can't change it.
    So I would find out the error code which this DBException contains.
    So in case of exceptions you can identify if this case has happened and react on it in your logic. You must interpretate this as an error or maybe as an expected condition - that depends on your logic.
    Another thought: can't you validate the values before you do the insert. Then this logic would not longer be encapsulated in the trigger, but maybe it is really a validation rule which the program should know anyway. What do you tell the user if it has occured?

  • JSP connected to MS Access using JDBC-ODBC

    If I want to run a jsp file connected to a MS Access database using jdbc-odbc bridge.
    I thought that I should use the following code to make the connection:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String database = "jdbc:odbc:Driver={Microsoft Access Driver(*.mdb)}; DBQ=http://myComputerName:8080/examples/jsp/DatabaseTest/mydatabase.mdb;DriverID=22;READONLY=fals";
    sqlca = DriverManager.getConnection(database, "dba","sql");
    but Tomcat 4.1 produces many errors.
    The file runs fine when I determine the complete path and include the local drive (C://) of the database Like the following:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String database = "jdbc:odbc:Driver={Microsoft Access Driver(*.mdb)};
    DBQ=C:/Tomcat4.1/webapps/examples/jsp/DatabaseTest/mydatabase.mdb;DriverID=22;READONLY=fals";
    sqlca = DriverManager.getConnection(database, "dba","sql");
    Of course I do not want to use the second code because I want to use my computer as a host.
    I will appreciate any answer!

    Yes, using the DSN, it works fine.
    But, I think it will run from the drive C.
    I want to use my computer as a host. So, I think that I should include the name of the computer in the path.
    I do not know may I am confused.
    I appreciate your reply. Thanks!

  • Getting Multiple Recordsets using A Single Connection using jdbc-odbc

    I have a java application which uses sql 7.0 database server. I want to have multiple recordsets created using a single connection using jdbc-odbc bridge. Kindly let me know the procedure.

    Well, you create a recordset, then you create another one, and so on. Are you actually having a problem or you just don't know where to start?

  • How to run Excel Macros using JDBC-ODBC

    Hi,
    I want to run the excel macros in the excel file, after I connected to excel file, using JDBC-ODBC bridge.
    How macros treated here?
    Help needed please..........
    - Ramesh

    How to run Excel Macros using JDBC-ODBCYou don't.
    As my fuzzy understanding goes.....
    Macros (excel, word, etc) run via a "OLE" extension of the script host system.
    So the only way to run them is via the OLE interface. That has nothing to do with ODBC. You can write your own JNI to do that, or you might get lucky and find that someone else has written a java library to do it for you.

Maybe you are looking for

  • FireFox 4 Crashes When Started (Both Normal and Safe Mode)

    When I open up FireFox 4 (both in normal mode and safe mode) it crashes within a few seconds. It is a fresh install of FireFox 4 but I also have FireFox 3.6 installed as well. The report that was given is: Add-ons: [email protected]:1.0.6,{5F590AA2-1

  • Voicemail notifications not working for iphone 4s

    voicemail notifications not working for iphone 4s

  • Approved podcast is not available after a week.

    I received the following e-mail from Apple stating that our podcast had been approved in the iTunes directory. Dear podcast owner, Your podcast, located at http://www.refactoredpodcast.com/?format=rss, has been approved. You should expect to see it o

  • Can't make an recurring appointment every 3 weeks?

    Hi- I just transitioned from a Blackberry to iPhone4. I am trying to set up my calendar with my work schedule. I work every 3rd weekend., but my phone does not give me the option to do that. I don't want to have to put in all of my weekends by hand!

  • Black preview in PE 10 using recent nVidia drivers

    Premier Elements 10 was working fine. Then I upgraded my nVidia drivers and after that the preview displayed only black video (audio was fine). Windows 7 and Quicktime are all up to date. Problem exists with all video file types to which I have acces