ANA国内線【PR】
Peace on Earth
カテゴリ:SQL Server
  • SQL Server 2000 JDBC接続
    [ 2007-02-20 16:18 ]
SQL Server 2000 JDBC接続
ココからドライバをダウンロード

Setup.exeをはしらせてインストール。

インストールフォルダの中のlibの中に
msbase.jar
msutil.jar
mssqlserver.jar

があるので、それにクラスパスをきる。

接続テスト用プログラム

import java.sql.*;

public class MsDriverTest
{
   public static void main( String[] args )
   {
      System.out.println( "Initializing Driver..." );
      try
      {
         Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver" );
         Connection c = DriverManager.getConnection(jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=nikoniko", "sa", "");
         System.out.println( "Initialized Driver." );
      }
      catch(Exception e)
      {
         System.out.println( "Error to Initialize Driver." );
         e.printStackTrace();
      }
   }
}
by nikoniko_felice | 2007-02-20 16:18 | SQL Server



Linux Windows javaなんかのメモ 忘れやすいもんで... あとGoogle, ネットでのニュースとかいろいろ

by nikoniko_felice
カテゴリ
タグ
最新のコメント
ithaca breas..
by PoodefedHox at 10:28
omega medica..
by AppomsdoP at 16:04
to: Admin - ..
by dautsBasy at 09:47
栗弄りながら、おっぱい ..
by 花鳥風月 at 15:11
c01ptkdu ..
by uyw84x5r : ブル大西 at 23:15
最新のトラックバック
Vicodin.
from Vicodin.
Cialis.
from Cialis.
デッケーーーおぱいw
from むろい
Acomplia.
from Acomplia.
Incest.
from Incest.
Ambien.
from Ambien.
Xanax.
from Xanax.
Viagra.
from Viagra.
Incest.
from Incest.
Ultram.
from Ultram.
以前の記事
お気に入りブログ
メモ帳
検索
おすすめキーワード(PR)
ファン
XML | ATOM

skin by excite