Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19776 > unrolled thread

Simple & easy BUT urgent

Started byOussama Romdhane <oussama.romdhane.official@gmail.com>
First post2012-11-17 15:02 -0800
Last post2012-11-17 22:11 -0500
Articles 3 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Simple & easy BUT urgent Oussama Romdhane <oussama.romdhane.official@gmail.com> - 2012-11-17 15:02 -0800
    Re: Simple & easy BUT urgent Jeff Higgins <jeff@invalid.invalid> - 2012-11-17 21:48 -0500
    Re: Simple & easy BUT urgent Arne Vajhøj <arne@vajhoej.dk> - 2012-11-17 22:11 -0500

#19776 — Simple & easy BUT urgent

FromOussama Romdhane <oussama.romdhane.official@gmail.com>
Date2012-11-17 15:02 -0800
SubjectSimple & easy BUT urgent
Message-ID<50f0e525-5faa-4c6f-97e9-e8449917aaf6@googlegroups.com>
hi everyone, I'm new here so hey there all !
I just want you guys to give me the necessary line codes to connect an access data base (.mdb) to a java program (I'm working on web services using the soap exchange  method)
Thanks a lot 
OR

[toc] | [next] | [standalone]


#19778

FromJeff Higgins <jeff@invalid.invalid>
Date2012-11-17 21:48 -0500
Message-ID<k89hqq$cu9$1@dont-email.me>
In reply to#19776
On 11/17/2012 06:02 PM, Oussama Romdhane wrote:
> hi everyone, I'm new here so hey there all !
> I just want you guys to give me the necessary line codes to connect an access data base (.mdb) to a java program (I'm working on web services using the soap exchange  method)
> Thanks a lot
> OR
import java.sql.*;
class Scratch
{
   public static void main(String[] args) {
     try {
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       Connection c = DriverManager.getConnection("yourdatabaseurl");
     } catch (Exception e) {}
   }
}

[toc] | [prev] | [next] | [standalone]


#19779

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-11-17 22:11 -0500
Message-ID<50a851c6$0$284$14726298@news.sunsite.dk>
In reply to#19776
On 11/17/2012 6:02 PM, Oussama Romdhane wrote:
> hi everyone, I'm new here so hey there all ! I just want you guys to
> give me the necessary line codes to connect an access data base
> (.mdb) to a java program (I'm working on web services using the soap
> exchange  method)

With DSN:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:Test");

DSN less:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = 
DriverManager.getConnection("jdbc:odbc:;Driver={Microsoft Access Driver 
(*.mdb)};Dbq=C:\\Databases\\Test.mdb;");

But now the important part: The JDBC ODBC bridge is known to
have problems - especially with concurrent usage. Web services
will typical be concurrent usage. I will strongly recommend
a different solution - maybe a different database.

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web