×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    52

    Problem for connecting database

    Hi

    i am developing an application for connecting remote database by using jdbc connection.the problem i am facing here is unable import javax.sql.* .pls help me how to solve this problem.the i have tried below given,

    Code:
      String url = "jdbc:odbc:CustomerInformation" ;
            String userid ="sreehari";
            String password = "rain" ;
            Connection db;
      try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                db = DriverManager.getConnection(url,userid,password); 
             
                
            }
    here i am getting problem on DriverManager.getConnection statement

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Problem for connecting database

    Are you attempting this on the phone or the server?

    On the phone: Java MIDP does not support JDBC, so there is no java.sql.* package. Unless you're using Oracle (there is a data access library from Oracle), you'll need to write your own interface, probably using an HttpConnection and some kind of server-side JSP/ASP/etc.

    On the server: in J2SE, DriverManager is in java.sql.*, not javax.sql.*.

    Graham.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    6

    Re: Problem for connecting database

    j2me does not support any jdbc api or such javax.sql pkg.

  4. #4
    Registered User
    Join Date
    Dec 2008
    Location
    Cochin, Kerala, India
    Posts
    84

    Re: Problem for connecting database

    For your concept implementation, you've to create a servlet or JSP file which implements a connection with the database in the server. In this case, you'll need to transfer the data only to the web, which's to be saved in DB.

    Vineeth K

Similar Threads

  1. 编译Qt样例出错,请看如下
    By TD3 in forum [Archived] Qt General ( Qt技术)
    Replies: 14
    Last Post: 2009-12-24, 03:23
  2. Database include problem...
    By FrankTheFox in forum Symbian
    Replies: 5
    Last Post: 2009-05-19, 10:33
  3. Database problem
    By kumar_sai123 in forum Symbian
    Replies: 1
    Last Post: 2008-05-23, 17:05
  4. database problem...
    By mayankkedia in forum Symbian
    Replies: 12
    Last Post: 2004-08-25, 09:08
  5. problem while creating database
    By ManishPatil in forum Symbian
    Replies: 4
    Last Post: 2003-12-26, 15:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×