关于用jdbc联sql server2000的问题,急啊,又不知道问题在那儿! 你要到微软网站下载classes111.jar 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 dburl="jdbc:microsoft:sqlserver://lmx:1433;DatabaseName=client";换成dburl="jdbc:microsoft:sqlserver://lmx";试一下 com.microsoft.jdbc.sqlserver.SQLServerDriver 错误提示socket连接不能成功,程序里url写的没错的话(再检查一下),到服务器上找找原因吧lmx机器上sql server服务启了吗?lmx上SqlServer Driver for Java安装完全了吗?。 谢谢各位,好像还和sql server2000的版本有关,我用的是开发人员版,好像一直不行明年;联不上,用企业版就可以呢,不知道大家试过没有! 可以和sun1979song交给朋友吗,我的qq:30736588邮箱:[email protected]欢迎大家联系,探讨java import java.util.*;import java.sql.*;import weblogic.jdbc.mssqlserver4.Driver;public class sqlTest{ public sqlTest(){} public static void main(String[] args) { Connection conn = null; Statement stmt = null; try { Class.forName("weblogic.jdbc.mssqlserver4.Driver"); System.out.println("Driver is ok....."); } catch(ClassNotFoundException e) { } try { conn = DriverManager.getConnection("jdbc:weblogic:mssqlserver4:buinfo@localhost:3014","lyw","3645202"); System.out.println("conn is ok..."); } catch(SQLException e) { System.out.println("conn error..."+e.toString()); } try { stmt=conn.createStatement(); java.sql.ResultSet rs = stmt.executeQuery("select * from usergroup"); if(rs.next()) { System.out.println("search is ok...."); } else { System.out.println("search is not ok..."); } rs.close(); } catch(SQLException e) { System.out.println(e.toString()); } try { stmt.close(); conn.close(); } catch(SQLException e) { } } } //when it run : Driver is ok.....conn error...java.sql.SQLException: java.sql.SQLException: $$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$Missing license file for: WebLogic Server 6.1$$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$Exception in thread "main" java.lang.NullPointerException at sqlTest.main(sqlTest.java:42)Press any key to continue...是驱动的问题还是驱动的问题 前段时间有人也有这种情况先用sql server manager去连接数据库看看 如果连不上 就是你的数据库tcp/ip远程监听没弄上!以前的兄弟在重装数据库后就可以了!:) 重写equals和hashCode 数组问题 equals() 万物为对象? 按下按钮如何显示一张图片 Map<String, String> 如果传进来int型可以接受吗 请问:这样格式的文件如何读取? jms的消息选择器 急 急 急 怎么在一个自运行系统创建一个mysql数据库以及里面的表? 一个运行时的简单问题? 大神指点 各位大侠帮小弟看看 续昨天的问题,JWindow的问题,请高手指点,高分
lmx机器上sql server服务启了吗?
lmx上SqlServer Driver for Java安装完全了吗?
。
邮箱:[email protected]
欢迎大家联系,探讨java
import java.sql.*;
import weblogic.jdbc.mssqlserver4.Driver;
public class sqlTest
{
public sqlTest(){} public static void main(String[] args)
{
Connection conn = null;
Statement stmt = null;
try
{
Class.forName("weblogic.jdbc.mssqlserver4.Driver");
System.out.println("Driver is ok.....");
}
catch(ClassNotFoundException e)
{
}
try
{
conn = DriverManager.getConnection("jdbc:weblogic:mssqlserver4:buinfo@localhost:3014","lyw","3645202");
System.out.println("conn is ok...");
}
catch(SQLException e)
{
System.out.println("conn error..."+e.toString());
}
try
{
stmt=conn.createStatement();
java.sql.ResultSet rs = stmt.executeQuery("select * from usergroup");
if(rs.next())
{
System.out.println("search is ok....");
}
else
{
System.out.println("search is not ok...");
}
rs.close();
}
catch(SQLException e)
{
System.out.println(e.toString());
}
try
{
stmt.close();
conn.close();
}
catch(SQLException e)
{
}
}
}
//when it run :
Driver is ok.....
conn error...java.sql.SQLException: java.sql.SQLException: $$$$$$$$$$$$$$$$ Lice
nse Exception $$$$$$$$$$$$$$$$
Missing license file for: WebLogic Server 6.1
$$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$Exception in thread "main" java.lang.NullPointerException
at sqlTest.main(sqlTest.java:42)
Press any key to continue...
是驱动的问题
还是驱动的问题
先用sql server manager去连接数据库看看 如果连不上 就是你
的数据库tcp/ip远程监听没弄上!以前的兄弟在重装数据库后就可以了!:)