Pretty new to jdbc...

Hi...I did more ASP than anything else and so I just would like to know if there is such a thing in java as connection strings(just like an oledb or ADO connection string in ASP to connect to a database) instead of using an ODBC type connection. That's because I don't have access to a DSN on the server to which I'm uploading.
Thanks!
pking...2002

JDBC uses connection strings. The connection string defines the JDBC driver and optionally other information that the driver might use. The optional information is specific to the specific driver.
ODBC only uses DSNs on the client box. Unless you have a file DSN and you have mapped drive to that file DSN, then using the DSN on the server is not an option in any case.
If you want to use the jdbc-odbc bridge driver then the JVM on the client must be a Sun JVM. You can either create a DSN on each client or use a DSN-less connection string. The DSN-less connection string format will depend on the database that you are connecting to. For examples you can search this forum using "DSN-less" and the name of your database.
If it is relevant then keep in mind that ODBC is not a suitable internet tool. It is suitable for a intranet.

Similar Messages

  • Hi, my MacBook Air is not working anymore if it's not connected with the power cable. It's pretty new so I can't imagine that the battery is dead already. Why can't I use my MacBook Air without the power cable even though I charged it for hours?

    Hi, my MacBook Air is not working anymore if it's not connected with the power cable. It's pretty new so I can't imagine that the battery is dead already. Why can't I use my MacBook Air without the power cable even though I charged it for hours?

    Please take the Mac to  Apple store to have it checked out.
    Genius Bar reservation
    http://www.apple.com/retail/geniusbar/
    Best.

  • New to JDBC

    Hello,
    I�m new to JDBC and I�m trying to execute a very basic query against Oracle database.
    The very same query gives expected output when is executed directly on the database in SQL*Plus:
    select sum(account_balance) from accounts
    SUM(ACCOUNT_BALANCE)
    125000
    when my JDBC program says that the responce data is null (System.out.println(rset.getObject(i)); prints null):
    columnClassName = java.math.BigDecimal
    null
    Could you plz give me a hint what am I doing wrong?
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
            String url = "jdbc:oracle:thin:@walery:1521:wal";
            String userName = "scott";
            String password = "tiger";
            Connection conn =
                    DriverManager.getConnection(url, userName, password);
            Statement stmt = conn.createStatement();
            ResultSet rset = stmt.executeQuery("select sum(account_balance) from accounts");
            ResultSetMetaData metaData = rset.getMetaData();
            int columnCount = metaData.getColumnCount();
            while (rset.next())
                for (int i = 1; i <= columnCount; i++) {
                    String columnClassName = metaData.getColumnClassName(i);
                    System.out.println("columnClassName = " + columnClassName);
                    System.out.println(rset.getObject(i));
                }

    I'm sorry guys, I was using the wrong scheme. Now
    it's ok.Cool. I'm glad it was something simple. :-)

  • I  want to make a bootable usb drive for my macbook air,and my ystem is osx mountain lion 10.8.5. How can i download it again without repaying for it so i can make my bootable flashdrive? I'm pretty new at this computer stuff so i don't know how things

    I want to make a bootable usb drive for my macbook air,and my system is osx mountain lion 10.8.5. How can i download it again without repaying for it so i can make my bootable flashdrive? I'm pretty new at this computer stuff so i don't know how things work.
    Message was edited by: tzaphon

    This is not difficult and you will not have to download from the app store.
    your computer has what is called  a recovery partition that came with it.
    simply hold cmd+R while you boot up. let go a second after you hear the chime.
    you will boot into the recovery partition.
    Use disk utlity to format your usb drive and then exit Disk utlity and go to Reinstall Mountain Lion.
    it will ask  you which disk you want to install ML onto. Choose your new USB drive.
    easy peasy

  • HT1725 Hi, I'm pretty new to itunes. I bought a song and it downloaded, but will only play the first 3 seconds? Any idea how I get it to play the rest of the tune?

    Hi, I'm pretty new to itunes. I bought a song and it downloaded, but will only play the first 3 seconds? Any idea how I get it to play the rest of the tune?

    I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the entry, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.
    (Not entirely sure what happens after you click that link, but fingers crossed it should be relatively straightforward.)

  • New WLS JDBC Technology page on dev2dev

    There is a new WLS JDBC technology page on dev2dev at
    http://dev2dev.bea.com/technologies/jdbc/index.jsp.
    We also expect to be posting new papers to it shortly.

    Hi Eric,
              The FAQs are already linked under "Newsgroups and FAQ".
              Tom
              Eric Ma wrote:
              > Tom:
              >
              > Thanks for pulling all the resources together in one place. Can you also add
              > links to JMS FAQ's?
              >
              > Eric
              >
              > Tom Barnes <[email protected]> wrote:
              >
              >>For the first time, it's all in one place!
              >>
              >>There is a new comprehensive JMS technology page on dev2dev for all
              >>public things JMS. It covers WebLogic versions 6.1 and later:
              >>
              >> http://dev2dev.bea.com/technologies/jms/index.jsp
              >>
              >>The technology page is also accessible from the left-hand nav underneath
              >>the Technologies header.
              >>
              >>In addition, there is a new JMS features section in edocs, which, also
              >>for the first time, centrally lists JMS features and their related
              >>links:
              >>
              >> http://edocs.bea.com/wls/docs81/jms/intro.html#jms_features
              >>
              >>Any feedback is welcome, and can go to dev2dev, or myself
              >>([email protected]).
              >>
              >>Tom, BEA
              >>
              >
              >
              

  • Pretty new to Java can someone please help with an addObject() problem?

    Hi I'm pretty knew to programming and I have an assignment which I've been working on but I am stuck
    I have to create a 'space invaders' style game, and I've got some basics working. I wanted to add a boss enemy, which appears when all other enemies have been destroyed. It kind of works, only the program spawns a seemingly infinite amount of the boss which then creates a 'wipe' effect across the top of the screen.
    Here is my code:
    import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
    import java.util.List;
    public class Space extends World
    * Constructor for objects of class Space.
    public Space()
    // Create a new world with 200x250 cells with a cell size of 3x3 pixels.
    super(200, 250, 3);
    //add class with starstreaks
    addObject(new EmptyBox(),1,1);
    //add player character
    addObject(new Player(), 100, 228);
    //add 4 romulan enemies row 1
    for(int i=0; i<4; i++){
    addObject(new Romulan(), (25 + 50 * i), 15);
    //add 3 klingon enemies row 2
    for(int i=0; i<3; i++){
    addObject(new Klingon(), (50 + 50 * i), 40);
    //add 4 romulan enemies row 3
    for(int i=0; i<4; i++){
    addObject(new Romulan(), (25 + 50 * i), 65);
    //add 3 klingon enemies row 4
    for(int i=0; i<3; i++){
    addObject(new Klingon(), (50 + 50 * i), 90);
    //add 3 shields
    for(int i=0; i<3; i++){
    addObject(new Shield(), (30 + 70 * i), 180);
    *public void act(){*
    List<Enemy> enemies = getObjects(Enemy.class);
    *if(enemies.size()==0 ){*
    addObject(new Borg(), 100, 30 );
    I believe the part in bold is the problem, but I dont know why. Klingon and Romulan are subclasses of the Enemy class. The Borg class is it's own seperate class, but with the exact same functions as Enemy. I made it seperate as I figured it would keep respawning if it was a subclass of Enemy.
    Any ideas?

    Its ok, after more than an hour I've got it.
    I simply added private int bossValue = 0; at the beginning and then changed act to this:
    public void act(){
    List<Enemy> enemies = getObjects(Enemy.class);
    if(enemies.size()==0 && bossValue==0 ){
    //for(int i=0; i<1; i++){
    addObject(new Borg(), 100, 30 );
    bossValue =1;
    }

  • Gaps only in black printing at same place on page, pretty new print head

    Have run diagnostics and repeatedly cleaned print heads, calibrated  etc but still getting breaks in the black printing, in same spots regardless of what's printed and across the page. Attached photos show print quality. Thanks, in advance. 

    Welcome , I noticed you are getting gaps in your black and any of colour blocks that uses the yellow on your HP Officejet Pro 8000, and I think I have found some more information for you.  Note: HP recommends that you use genuine HP ink cartridges. HP cannot guarantee the quality or reliability of non-HP ink cartridges or refilled HP ink cartridges. If you do not use genuine HP ink cartridges, the steps in this post might not resolve the issue you experiencing. ** This is also for Printheads. **  In your title, you mentioned this is a new printhead? I just want to confirm that the printhead your replaced was the HP 940 Black/Yellow Officejet Printhead. (C4900A)    It sounds like you have done a lot of troubleshooting on your own, but just to make sure you haven't missed any steps you can review these documents;HP Officejet Pro 8000 Printer Series (A809) - Troubleshooting Print Quality IssuesPoor Print Quality Immediately after Setup, an Extended Idle Period, or after Printhead Replacement (This one for sure.)  When did you replace the printhead? Consumables have there own warranties, you can review the Limited Warranty for HP Ink Cartridges and Customer-Replaceable Printheads for HP Inkjet Supplies - then Contact HP Support for further assistance. Fill in the model number and the form to receive a case number for quicker assistance.  Please let me know if these steps resolved your issue, or if there is anything else I can do to help.  I look forward to hearing from you!   Thanks, 

  • I'm using a Dell Inspiron 7520 ... pretty new. Sometimes when I download a CD / album to my library acouple of tracks get separated away from the main group. I've tried to click and drag the stragglers over to the main group but it doesn't work. Any Ideas

    .When installing a CD/album into my library some of the tracks get separated away from the main group of tracks. I try to click and drag the stragglers to the main group but it doesn't work. My laptop is using Windows 8. My old XP laptop didn't have this problem. I'm not sure if that has any thing to do with it. Any ideas would be appreciated. It's more of an irritation than a problem but if it can be solved, it would be a good thing. Thanks!         Paul 

    Hey Paul,
    If I understand correctly, it sounds like iTunes is not grouping the songs from a particular CD together. The cause could be something as minor as a misspelling or slight variations. For more information, see the following resource:
    Why aren't songs with the same album art grouped together?
    http://support.apple.com/kb/TS1468
    Thanks,
    Matt M.

  • Help with heapsort.  Pretty new to java

    Hello,
    I am following a tutorial on heapsort for my java class. I implemented it but the problem is this. The first element in the array i pass in is never changed. Here is the code. What am i doing wrong from this tutorial. What should i do?
    public static <T extends Comparable<T>> void heapSort(T[] array)
            heapit(array.length - 1,array);
      public static<T extends Comparable<T>>void swap(int i, int j,T[] array)
          T temp = array[j];
           array[j] = array;
    array[i] = temp;
    public static <T extends Comparable<T>>void heapit( int end,T[] array )
    for ( int i = end / 2; i >= 1; i-- )
    fixheap( i, end, array[i],array );
    for ( int i = end; i > 1; i-- )
    swap( 1, i,array );
    fixheap( 1,i - 1 , array[1],array );
    public static <T extends Comparable<T>>void fixheap( int root, int end,
    T key,T[] array )
    int child = 2 * root;
    if ( child < end && array[child].compareTo(array[child + 1]) < 0 )
    child++;
    if ( child <= end && key.compareTo(array[child])< 0 )
    array[root] = array[child];
    fixheap( child, end, key,array );
    else
    array[root] = key;

    ejp wrote:
    It's usual to use 1-based indexing in heapsort algorithms.
    So maybe the problem is that you are expecting element[0] to be sorted and it isn't? which it won't be, because of the 1-basing.{noformat}
    There's nothing a little math can't cure: for a 1 based algorithm a node at position i has its children at position 2*i and 2*i+1 so for a 0 based indexin scheme the node is at position j+1 and its children are at position 2*(j+1) and 2*(j+1)+1. Because the nodes are stored one position to the left the children of node j are 2*(j+1)-1 and 2*(j+1)+1-1.{noformat}
    kind regards,
    Jos

  • How to keep a pretty new iPod touch 4g 32gb in great condition!

    What's the best type of case?
    Flexi case
    Hard Case
    Leather Flip Case
    How to clean the screen?
    Windex
    Glasses Cleaner
    A dab of water and soap
    And last what are some big NO NOs?!?!?!

    The leather flip case works great for me! it protects it from scratches on all sides! Make sure you get the ones that dont flip down cuz they make it hard to charge and plug in headphones

  • Pretty new to this, 2 recordings, doesn't sound right.. need help!

    we had a narrator come into our own booth and record a lot of narration for us.  She came back today to do some additions and corrections.
    Used the same equipment, same booth, same everything, but for some reason it just doesn't sound right, it sounds "muffled" a little.. at least to me.  I don't normally "clean" audio so I'm kind of lost.  I haev the frequency analysis open and see the graph, and between 16000 and up its much much lower on the original recordings than it is on the ones done today.
    Is there ANY way to try to get these matched up closely? All i've really tried is the EQ but that doesn't seem to get me very far.. what other things could I try... I'm really not an expert at this by any means!

    This sort of problem has plagued everybody recording narrations for years - it's virtually impossible to get an identical sound between narration sessions unless you are seriously lucky. All it takes is for the narrator to have a slight cold in the head and be wearing different clothes - and they sound different if a direct comparison is made. Even worse is if they had a slight cold or whatever the first time around and are fine the next - you'd need them to get that cold again! And no EQ or anything else can even begin to compensate for this - the human ear is incredibly sensitive to the sound of voices, and even really subtle changes are very noticeable.
    Best thing to do is to re-record sections, and not just corrections - you can often get away with this if there are breaks between sections. Even then it may not be right.
    The way it has always worked for me is that if alternatives may be required, we do them all at the same sitting - and record a load of 'silence' too - that comes in more useful than you might ever imagine. And if it's critical, then re-record the whole thing - the amount of editing and correcting time required may well exceed the re-recording time, so often its worth it even though it sounds mad on the face of it.

  • Why do i get the UnsupportedOperationException

    Hello
    with the code below i get the UnsupportedOperationException. Why? Is it because i (have to) use MS-Access 2000?
    If yes, can someone tell me how to do it another way?
    I am pretty new to JDBC so help would be a nice gift.
    Sincerely
    Matthias
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    conn = DriverManager.getConnection(jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\\test.mdb);
    String sql="INSERT INTO Material (Name,Size,price,Category) VALUES (?,?,?,?);";
    PreparedStatement ps=conn.prepareStatement(sql,PreparedStatement.RETURN_GENERATED_KEYS);
    ps.setString(1,mat.getName());
    ps.setString(2,mat.getSize());
    ps.setDouble(3,mat.getPrice());
    ps.setInt(4,mat.getCategory());
    ps.executeUpdate();
    rs=ps.getGeneratedKeys();
    int id=-1;
    if (rs != null)
         if (rs.next())
              id=rs.getInt("ID");
    mat.setId(id);

    The JDBC-ODBC bridge driver doesn't support getting
    generated keys - that's why you got it.Is there another driver that is able to work with MS-Access DB�s and that suports generated keys?
    You can get it yourself - follow your INSERT w/a
    SELECT with a WHERE clause that will only bring back
    the key that you just created:
    SELECT MAX(ID) FROM MATERIAL;
    While i searched the Forum i found out, that this is a rather bad solution so i decided not to use it...
    Thanks anyway
    Sincerely
    Matthias

  • New to JAVA - ODBC/JDBC - clarification

    Hi,
    I am using Window XP. I am in my initial stages of learning JAVA.
    I am using one of the books to learn the language. I wrote to the following code to interact with the database - "websites.mdb" which is in a different location than java.
    import java.sql.*;
    public class MakeTheConnection
    public static void main (String[] args)
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String sourceURL = new String ("jdbc:odbc:websites");
    Connection DatabaseConnection = DriverManager.getConnection(sourceURL);
    catch (ClassNotFoundException cnfe)
    System.out.println(cnfe);
    catch (SQLException sqle)
    System.out.println(sqle);
    When I run the above code I am geting the following error:
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    I also tried creating a DSN which I tried using it here in the sourceURL but still in vain, i got the same error. I would really appreciate if somebody could help me in providing pointer or information regarding to solve this problem and be able to interact with databases. I use MS access.
    Thanks in advance.
    PK

    Hi,
    I created the file DSN through Control panel - > ODBC called "Test" and I used that in the following manner:
    try
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              String sourceURL = new String ("jdbc:odbc:Test");
              Connection DatabaseConnection = DriverManager.getConnection(sourceURL);
    I hope that is right. I am trying to execute using these code. I am getting the following error, I am not sure where the problem is.
    C:\jdk1.5.0\bin>java MakeTheConnection
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    Please do let me know.
    Regards,
    PK

  • New SQL Server 2005 JDBC Driver

    Dear All,
    I am grasping for straws here. I have a very strange issue with
    the new Microsoft JDBC driver (Microsoft SQL Server 2005 JDBC Driver).
    I have a couple of strange things happenning when I am using this driver,
    but the most critical one is that the application literally hangs
    executing a readObject statement:
    ExpressionBuilder trp= new ExpressionBuilder();
    Expression exp1 = trp.get("ID").equal(ID);
    getDatabaseSession().readObject(Trip.class, exp1);
    I can see that it actually executes the statement, then hangs.
    Any ideas would be greatly appreciated
    I am using 10g Release 3 (10.1.3.0.0) (Build 060118)

    Are you able to get a thread dump to see where the threads are?
    Doug

Maybe you are looking for

  • Logical Expression (Rel Operators)

    Hi, Can any Please provide the more Detailed information and Example Programs on Logical Expressions  Operators( CO, CA, CN ,NA .... ) Regards,

  • My Calendar App -

    In my Calendar app - I am trying to fill in an event that happened 2 months ago. The calendar app does not post it to my current calendar for those previous months.  What I am trying to do is use my calendar app as a journal and fill in information a

  • Fixed Date Columns

    Hi Everyone, Does anyone know how to create a formula that will generate finxed date columns for a certain period of time. I'd like to put a range of two dataes (l3 months) and have the formula generate a column for each day, even though I may not ha

  • Adding a scrollbar to a portlet

    I am trying to limit the amount of screen space that my portlets take up, so I want to add a scrollbar to them if this is possible. I read earlier about possibly using a javascript. If anyone has experience with adding a scrollbar, I'd appreciate the

  • 10.6 Server AFP - ACL Permissions Edit Window Shows No Options

    Hello, I'm trying to add a group to the ACL of an AFP share. I can add the group but when I want to edit/modify ACL options the window looks like this: That's about as far as I've gotten. The Edit window has nothing to edit.