JAVA kai Databases

Andreadakis Manolis manolis at andreadakis.gr
Tue May 18 15:09:33 EEST 1999


Tassos Mavroudeas wrote:

> Exw arxisei va ftoiaxvw kapoia java applet pou xrhshmopoiouve JDBC. To 8ema eivai oti evw mev mporw va xrhshmopoihsw JDBC:ODBC kai
> va suvde8w se database katw apo win-32bitODBC, dev 3erw pws morw va suvde8w se database pou briskete se linux server.
>
> Prepei eite va xrhshmopoihsw native-driver gia thv ekastote database, eite va stisw ODBC support gia to ekastote dataabase katw
> apo Linux. Auth thv sthgmh exw eggatestimeveh PostreSQL. Sto readme leei oti erxete me JDBC support pre-installed, alla dev 3erw
> pws va to xrhshmopoihsw (estw oti uparxei).
>
> 8a me evdiefere va ma8w to pws givete va xrhshmopoihsw JDBC eite me thv PostgreSQL eite kai me mySQL. Ti prepei va kavw configure
> se evav tetoio SQL server gia va exw JDBC access;

Kapoia pragmata gia tin mySQL
Exei kateutheian ypostiriksi JDBC
opote auto pou prepei na kaneis einai  na katebaseis enan apo tous 2 jdbc driver apo to
site tis mysql http://www.mysql.net/Contrib/
 i kateytheian apo
http://www.worldserver.com/~mmatthew/mysql/
 i
http://www.voicenet.com/~zellert/tjFM/

na ton ksezipareis sto directory toy project sou
kai tha sou dimiourgisei tin dentriki domi pou exoun oi claseis tis java
px
 i classi  com.imaginary.sql.msql.MsqlDriver tha ftiaksei ta
  com/imaginary/sql/msql
 opote eise sxedon etoimos....  public static void main(String args[]) {


grafeis kati san

//------ for Windows ODBC
//    String url = "jdbc:odbc:db-name";
//------ for mSQL
//  String url = "jdbc:msql://home.sweet.home:1114/db-name-on-msql-server";
//------ for mySQL
    String url = "jdbc:z1MySQL://home.sweet.home/db-name-onmysql-server";

    try {

            System.out.println ("Java Server Starting...");
//      Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
// For mSql
//      Class.forName ("com.imaginary.sql.msql.MsqlDriver");
// for the mySql
        Class.forName("twz1.jdbc.mysql.jdbcMysqlDriver");


            System.out.println ("Contacting DataBase Server...");
        con = DriverManager.getConnection(url,"test","test");
//        checkForWarning (con.getWarnings ());
        DatabaseMetaData dma = con.getMetaData ();
                    System.out.println("\nConnected to " + dma.getURL());
                    System.out.println("Driver       " +
                            dma.getDriverName());
                    System.out.println("Version      " +
                            dma.getDriverVersion());
                    System.out.println("");


ktl......






--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list