Jdbc impresser

Hi! I had a problem in inserting the records in a table either in sql or access.Can anyone help me to do this. the query is
insert into emp values('mamitha',20);
plz help me
mamitha

And does your table only have two columns? This seems a basic SQL question really. Do you know much about SQL at all?

Similar Messages

  • Jdbc thin driver with Oracle 9i database

    Hi,
    I'm having a problem with java code which previously deployed ok on an Oracle 817 database. In attempting to access data from a 9i database I get the following error:
    java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
    From looking around I get the impression that the problem is with an incompatability with the driver and the 9i database. Any ideas as to whether this is true or not or suggestions on how to resolve it?
    Any help will be greatly appreciated.
    Thanks,
    Alison

    I don(t understand,my JBuilder use the libraries from Oracle 9.01
    and when I make a connection,
    with this code:
    DatabaseMetaData meta = conn.getMetaData();
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    It send me back thin driver 8.17
    how is it possible?

  • Instant client and jdbc bug 6362104

    I am having a problem with the latest version of the instant client for Linux and tomcat. The error message I get is: "Error while registering Oracle JDBC Diagnosability MBean" which has been determined to be bug 6362104. It looks like there is a patch for the jdbc but I was wondering if there will be a patch for the instant client to correct this?
    I ran the check java -jar ojdbc6.jar and it is definitely the unpatched version as the plus sign does not show up on the word Production. Is it as simple as getting the patched jar file and copying it in?

    Hi:
    I had already downloaded and installed the base package, the SQLPlus package and the ODBC packages from Oracle. I unzipped all 3 into a common directory, and ran the .exe that installs the Oracle ODBC dlls etc so that the Windows ODBC Data Source Administrator knows about them. ( Before that, the Oracle ODBC choice wasn't in the admin pulldown). My problem is in trying to now create an ODBC data source using those Oracle drivers. The Windows admin tool still seems confused in that I can't select the ORCL service I know to be out there.
    What am I trying to achieve?: I have a perfectly fine Oracle 10gR2 database running and I have connected to it with some Java based web services and isqlplus etc. to do what I need to do. Other users are creating a C++ application on Windows XP that needs a database, and would like to use my database via ODBC connections.
    What application?: A custom C++ application that merely wants to store some data in very simple tables in the 10g database.
    Why ODBC?: Well, other than the PITA driver installation, it's a fairly good way for a C++ program to connect to Oracle. I'd rather not have to have them worry about OCI or Pro*C or whatever it is.
    Why have I chosen Instant Client?: I was under the impression (as I think I stated in the initial message?) that it was the way to give access to these C++ coders to the database with the smallest Oracle footprint on their machines. I know I could load the entire Oracle Client and I may have too, but Instant Client's raison d'etre is so that one does not HAVE to load a big fat Oracle client, is it not?
    Thanks

  • Error deploying JDBC driver for SQL Server 2005

    Hi all
    I'm trying to deploy a JDBC driver for MS SQL Server 2005 (downloaded [here|http://www.microsoft.com/downloads/details.aspx?familyid=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en]). When I try to deploy it according to the instructions found [here|http://help.sap.com/saphelp_nwce10/helpdata/en/51/735d4217139041e10000000a1550b0/frameset.htm] it fails.
    The error in the logs doesn't give any useful information though. It only says Error occurred while deploying component ".\temp\dbpool\MSSQL2005.sda".
    Has anyone else deployed a driver for SQL Server 2005, or perhaps have any suggestions of what else I could try?
    Thanks
    Stuart

    Hi Vladimir
    That's excellent news! Thanks for the effort you've put into this. I'm very impressed with how seriously these issues are dealt with, specifically within the Java EE aspects of SAP.
    May I make two suggestions on this topic:
    1. Given that NWA has such granular security permissions, please could the security error be shown when it is raised? This would help immediately identify that the problem isn't actually a product error, but rather a missing security permission (and thus save us time and reduce your support calls).
    2. Please could the role permissions be clearly documented (perhaps they already are, and I just couldn't find the docs?) so we know what is and isn't included in the role. The name is very misleading, as a "superadmin" is generally understood to have no limitation on their rights - so clear documentation on what is in-/excluded would be most helpful.
    On a related topic, I came across another issue like this that may warrant your attention (while you're already looking into NWA security issues). I logged a support query about it (ref: 0120025231 0000753421 2008) in case you can retrieve details there (screenshots, logs, etc.). It's basically a similar security constraint when trying to create a Destination. I'm not sure if this is something you would like to include as standard permissions within the NWA_SUPERADMIN role or not, but I think it's worth consideration.
    Thanks again for your help!
    Cheers
    Stuart

  • JDBC and SQLJ

    Can I use SQLJ inside my servlets? Or, do I have to create stored procedures with SQLJ and connect to those through JDBC in my servlets? If I use SQLJ as stored procedures, how do I retrieve the information from the SQL calls from my servlet?
    Thanks

    Hi jmennen,
    Yes, your servlets can use SQLJ, provided they have access to the appropriate SQLJ classes.
    However, your question gives me the impression that you are very confused regarding SQLJ and/or JDBC.
    I suggest you state what you want your servlet to do, and thus allow people to suggest the best way to implement your servlet.
    [You may not even [i]need SQLJ (or JDBC) :-]
    Hope this helps.
    Good Luck,
    Avi.

  • IBM U2 Universe JDBC or ODBC, Can't connect

    Hi, I can't find a definite answer on the forums, so I will
    post this here. I'm trying to set up a JDBC or ODBC connection to a
    Universe 10.0 database.
    I've been able to setup both the ODBC and JDBC drivers in
    other programs, but coldfusion still isn't working properly.
    The ODBC connection will verify, but when you try to do
    anything, you get the error "invalid argument value" everytime,
    making it useless.
    The JDBC connection has offered more success, but is still
    useless. SELECT statements work 100% and don't give a problem.
    UPDATE, INSERT, or DELETE statements will work and update the
    database, but the .cfm page loads constantly until it hits the
    timeout period and throws an error. It's like the server is not
    responding back from anything but SELECT statements.
    If there is any updates on the status of these problems,
    please let me know, because I can't find any solid solutions on the
    net.

    No, the JdbcOdbc bridge appears to be calling it.
    I'll look for an option; where on earth do I find
    documentation on it?Notice the part where I said noted that it might be obscure or not documented at all?
    The most likely place is to find the source code for the ODBC driver and hope it has documentation. It might also be documented in the source code itself.
    >
    Is it allowed to hack the JdbcOdbc code? I was under
    the impression that accepting the Sun licence limited
    that option. The driver comes with Jdk 1.4. :-$
    Yes, as long as you do not distribute it.

  • Pooled jdbc connection(s), and server resources

    Hello All,
    I am curious about the difference between jdbc connections in a connections pool, and 'stand alone' connection. I have Oracle 9.2
    To describe...
    In my application server (WebLogic) I have a connection pool, with 10 connections. Does this take less server resources than 10 separate connections? I notice that there are still 10 server processes appearing.
    thanks!
    JM
    the jdbc Programmer's Guide and Reference says...
    (( start quote ))
    A pooled connection instance encapsulates a physical connection to a database. This
    database would be the one specified in the connection properties of the connection
    pool data source instance used to produce the pooled connection instance.
    A pooled connection instance is an instance of a class that implements the standard
    javax.sql.PooledConnection interface. The getConnection() method
    specified by this interface returns a logical connection instance that acts as a
    temporary handle to the physical connection, as opposed to encapsulating the
    physical connection, as does a non-pooling connection instance:
    (( end quote ))
    ...I had the impression that a connection pool of 10, results in one 'physical' connection. But it appears not!

    No, and yes...
    A pool of 10 connections creates 10 physical database connections, which require exactly the same resources as 10 connections from a standalone Java app or 10 connections from SQL*Plus.
    The connection pool, however, allows those 10 physical connections to server one the order of 100 logical connections (in an average OLTP application). If you have a JSP page that opens a connection, runs a couple of DML statements, and closes the connection, having a connection pool greatly reduces the load on the database because it does not have to create a new physical connection for every JSP page-- the JSP page gets a connection from the pool, uses it for a bit, and returns it to the pool where it can be assigned to another JSP page. Because each user only needs the connection a small percentage of the time, you can server many physical users with only 1 physical database connection.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • What is the MAX amount of DATA for JDBC?

    Hello,
    Did anybody had any expericence with how jdbc works with large amount of data SAY
    > 1/2 GIG or more?
    Any help apprecieated
    Thanks.
    Paul

    Always depends on the driver implementation. Each
    driver/database combination deals with massiveamounts
    of data in a single transaction differently. Canyou
    be more specific? In general Most Drivers of
    commercial grade quality and/or shipped with the
    top
    5
    RDBMS have pretty solid implementations limitedsoley
    by network bandwidth to carry this info. A good
    developer however will not rely on the driver to
    manage this much info and will develop a scheme
    to
    minimize the impact of such large data transferson
    an
    unsuspecting database or client.
    LThis is what I thought. I just need moreinformation
    if for example I have a JAVA process which feedsdata
    from RDMBS and the amount of data the processreceives
    SAY 2GIG My guess this all get in "ResultSet"object
    and thus all feeds in VM( memory) so I have to
    designing my process SUCH that it takes only asmall
    sample of data and iterate this until I get all the
    information from my query. Ex.
    select * from test where data between 1 and 2000000;I
    have to brake this down by "DAYS"
    so my code will be something like
    for (int i=0 ;i<2000000 ;i++) {
    String select=null;
    select="select * from test where data="+i+;
    do( something else)
    Am I close far? Is there another way that may beJDBC
    driver handless this behind scenes?
    Well personally I think you should be structuring your
    SQL better than that. Making 2000000 calls over a
    network in a for loop is suicidal..and lets not forget
    how something like that will block your application.
    First you can do something like "select * from test
    where data <= 2000000" in one shot. Now you get the
    whole set and you can scroll through and do your
    operation ( of course this is slow too, but its much
    better than running the query 2000000 times ).
    the other thing you have to consider is : is it
    necessary to really block during an operation like
    this? Can it be done in another thread? a daemon
    process even? Some service which can be polled for
    results when needed?
    This is a tricky example and I'd be interested to know
    more about what you are trying to do.
    When you were talking about large data I was under the
    impression of something like a blob, clob, or any sort
    of single query with 2gb of data in the result.
    Can you break up your query? Doing things in batch in
    an alternative thread can yield to other processes
    perhaps?
    Loh, and also: Can the Database itself take care of this business? Stored Procedures and Internal Functions are all built to handle massive amounts of data with minimal impact. Can you leverage the technology within the Database to accomplish your goal? Sometimes a well written procedure can save you tons of work in your business logic tier.
    The right tools for the right job..
    L

  • Jdbc non-odbc-bridge for Access mdb database

    I would like to have my Java program be able to use a MicroSoft Access-97 or Access-2000 mdb database. I don't want to use an odbc driver, but instead use a type-2 or 3 or 4 driver (preferrable type-4).
    Does such a driver exist? This is for a freeware project, and I would prefer a free or very low cost driver.
    I'm not sure I fully understand the differences between jdbc types. My impression is that an odbc-bridge driver requires that the end-user setup the odbc connection. I'd like to avoid that if possible.
    My intent is to distribute the application with the MyApp.mdb database file, and have MyApp be able to use the database without user setup.
    I suppose an alternative would be to programmatically create the odbc-bridge data source configuration. Is that possible from a java program, and, if so, how? I can do this with Visual C++, but not clear on how to do in Java

    Searching the forums is always a good idea.
    From one of the previous times I answered this.
    http://forum.java.sun.com/thread.jsp?forum=48&thread=199027

  • Looking for Bug description 3133645 in JDBC-Thin-Driver

    Looking for Description of Bug Number 3133645. An error "Sorry, this page was not found" occurs, when calling this page.

    Well actually...
    If the "prepareStatement()" invocation worked, but the "execute()" invocation failed (which matches the situation you have described in your original post), then the "PreparedStatement" would, most definitely, not be null, and the "close()" method (as per my sample code) would, most definitely, be executed.
    So I still get the impression that you are probably not closing your "Statement" instances (in cases where an error is occurring).
    Also, in my experience with Oracle's "thin" JDBC driver (i.e. the "classes12.zip" file), closing a "Connection" does not close any "Statement"s associated with it -- "Statement"s need to be explicitly closed.
    Perhaps you need to check your code again -- or post your actual production code for a third-party to scrutinize.
    Good Luck,
    Avi.

  • EJB Impressions?

    Hi all,
    I was hoping to get some feedback from you guys regarding the usefulness of EJB's in J2EE applications. I am currently researching this topic for a class I am taking. I've been reading the J2EE Tutorial, and all the relevant sections, as well as running the examples, and I think I'm getting a pretty good overview of how they work.
    However, I have never actually used EJB's in a real world application. I only have some experience with JSP, servlets and JDBC. I was hoping some of you might provide me with your real-world EJB experiences/impressions. What are the pros, cons? What are the scenarios in which you would want to use them, and when (if ever) would you avoid using them?
    Thanks a lot in advance.
    Samantha

    Pro: It's good to use EJBs when you are building a networked application with multiple computers. Using J2EE and EJBs gets the app online much sooner, and keeps it scalable.
    Con: If your app is going to stay within the capacity of a single server EJBs could be overkill
    Pro: J2EE (EJBs) supports communications between systems by different manufacturers
    Con: If all your app components come from the same vendor, you may not need this capability
    Pro: An EJB container can enforce security restrictions on access to data based on user types.
    Con: If your app doesn't deal with sensitive data - or you have other options for security you might not want an EJB
    Pro: EJBs can provide for storing and restoring of the vital data of an EJB object - which makes it appear that the object is always available.
    Con: Other options could be an OO database.
    Pro: As the J2EE standard becomes more accepted there are more companies that are creating toolkits that simplify interfacing and creating EJB components
    Con: The functionality that you need might be available off the shelf - but at a high cost.
    Pro: An EJB container can provide management of transactions so that equipment failure can not corrupt a database.
    Con: If your app doesn't involve database transactions - or your transactions aren't critical - you may not need this capability
    Overall Experience:
    I've used EJBs for working with communications and databasing with sensitive information. Other methods don't provide the security - or guaranteed data quality. EJBs can be used among several applications that are needing the same functionality - including security.
    So, for security and data integrity EJBs are often the way to go.

  • HELP!!! Cannot deploy J2EE application with Oracle JDBC driver...

    Hi,
    I am writing a J2EE application which (in theory, at least)
    connects to an Oracle 9i database.
    I have written a simple Java test app utilising only the
    java.sql package classes (e.g. Connection, ResultSet) to directly
    connect to the database. As long as the classes12.zip is in the
    CLASSPATH it works fine.
    Now I have written an Enterprise application (SessionBean,
    Remote and Home interface and Client) which I am attempting to
    deploy via deploytool.
    If I include just the client jar and EJB jar in the application
    it deploys okay but when I run the application (using runclient)
    it produces the following error:
    java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
    (It is nested within other error output but that is the core
    issue).
    However if I try to include the JAR libraries into the app
    (classes12.jar and nls_charset.jar from $ORACLE_HOME/jdbc/lib),
    then I get the following output from deploytool when I hit the
    "deploy" (or "redeploy") button:
    Deployment error: invalid entry compressed size
    (expected 14411 but got 14580 bytes)
    Can someone please tell me what is going on???
    How can I deploy the J2EE application including the Oracle
    JDBC Driver???
    My only other option at the moment is to place all the function-
    -ality in the client and not use the J2EE framework.
    Any help is greatly appreciated.
    Regards,
    Ben New
    Leftclick Software Development
    [email protected]

    OK Ben,
    I admit I'm a bit confused. Let me see if I understand where you're
    coming from.
    You have written a J2EE application that includes a session bean,
    correct? If so, your session bean needs to be deployed to an EJB
    container. What container are you using? The Oracle 9i database
    has an embedded EJB container which (theoretically) you can use.
    However, as far as I know, Oracle recommends you use OC4J as the
    EJB container. So again I ask, what EJB container are you using?
    If, as you say, you are new to EJB, then I think you should
    immediately start working wiht OC4J as your EJB container.
    Did you look at the tutorial link I gave in my previous post? It
    explains -- step by step -- how to create, deploy and run a J2EE
    application using OC4J as the EJB container. It also has links to
    introductory material for people without little knowledge of J2EE
    and EJB.
    I have 9iAS Enterprise Edition and 8.1.7.1.0 database server (and
    OC4J) installed on my SUN machine. I cannot find any of the
    utilities you mention -- "j2eeadmin","runclient" or "deploytool".
    What Oracle software have you installed? What are the versions?
    What platform are you using?
    A J2EE application (according to the specification from SUN)
    consists of modules. A module can either be a client module or an
    EJB module. A client module can either be a java application client
    or a web-based client (servlet or JSP). A J2EE application usually
    contains one client module and one EJB module. A J2EE application
    needs to be deployed to a J2EE container.
    Hopefully the J2EE picture is becoming clearer. I think you need
    to read some introductory material regarding J2EE if you intend
    to become proficient at it.
    I feel that you are under the impression that a J2EE application
    is a glorified JDBC application. It isn't (as far as I'm aware).
    Good Luck,
    Avi.

  • JDBC for SQLServer

    Hi!
    I'm trying to make the JDBC driver from Weblogic to cache all
    the rows in a query once and not have to retrieve it in block sizes.
    If I have a 1000 rows is it possible for the JDBC driver for SQLServer
    download all 1000 rows at once and not have to hit the SQLServer
    again?
    Thanks!
    -Kan

    I monitored the network traffic on the wire and not all the rows were
    downloaded. There are other JDBC drivers
    that have a flag for clientcursor and that downloads all the rows when I
    view the packets on
    a network monitor. Is there such a flag in weblogic's JDBC?
    Michael Girdley <[email protected]> wrote in message
    news:398790cd$[email protected]..
    I was under the impression that JDBC mandated that all of the results from
    an SQL query be loaded into the ResultSet and therefore available inmemory.
    So, they should be cached by default.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    "Kan" <[email protected]> wrote in message news:[email protected]..
    Hi!
    I'm trying to make the JDBC driver from Weblogic to cache all
    the rows in a query once and not have to retrieve it in block sizes.
    If I have a 1000 rows is it possible for the JDBC driver for SQLServer
    download all 1000 rows at once and not have to hit the SQLServer
    again?
    Thanks!
    -Kan

  • More JDBC Woes

    I am plugging along on this Foreign JDBC driver project (IBM AS/400 Connectivity). Through the answer of my previous question I have been able to create my Entity/View beans. When I try and test them by creating a module and using the "test" menu option through the IDE environment I get the error "No Suitable Driver".
    Is there a way to get around this? For kicks I created a JSP application using this business component to test. When I click on the items I get a JDBC connectivity error of some kind.
    I am fairly impressed with JDeveloper and would like to continue to use. If I can get through this then I will be convinced.
    Thanks Again
    John Brown
    null

    After working with this problem some more I did notice that the above error isn't the first error received...
    When I run the test option -- after getting a signon screen I get...
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
    Then when the error window is displayed I am getting no suitable driver...
    Hope this clarifies...

  • JDBC  + WAR deployment

    I've recently moved to JDeveloper and was quite impressed with the ability to deploy directly to a WAR file. However, I seem to have run into some trouble. When I use classes12.jar JDBC drivers in my project library and build the WAR it includes many of the JDBC classes in the WAR file. So I bring this war over to Tomcat in the usual way and my database connections don't work. I get:
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:537)
    Somewhat strangely if I go directly into the deployed WAR file and remove the Oracle and Javax directories from my classes folder, and then add classes12.jar to my Tomcat/lib directory then everything works fine.
    It seems as though the process of deploying to a WAR file is corrupting or omitting certain important classes.
    1) Would anyone have any idea what could cause this sort of behaviour? Is there a problem with JDevelopers WAR deployment?
    2) Also failing all else, is there a way of including the classes for compiling but not having them included in the WAR file? I tried putting oracle12.jar into the lib and lib/ext directory but it didn't seem to pick them up.
    Thanks in advance,
    Dave Molloy

    I found that if I went into my deployment settings (JDeveloper project, right click on your <>.deploy file and select "Settings..."),
    under the "WAR File" - "WEB-INF/lib" section, I could choose which libs were included in the war file.
    I didn't include classes12.
    (of course mine worked if I included it or not, so it isn't quite the same what you are experiencing.) I think it just pulled the one from <ORACLE_HOME>\jdbc\lib\. Unfortunately, it doesn't include a manifest file with a version...so you probably have to check the create date/time or the included classes to figure it out.
    Maybe your two classes12 files are for different versions, and so they are conflicting. This might explain why it works if you put the classes12 directly in your app server, but fails when it is also in the war.
    If you do include classes12 in the war file, using a manifest file may help the classloader with determining the precedence that you want.

Maybe you are looking for