Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Database/JDBC/SQL/JDO/Hibernate  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 sqlserver 加载不了 不知道 为什么 请教
athen





发贴: 14
积分: 0
于 2005-01-28 00:14 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
void jButton3_actionPerformed(ActionEvent e) {

try{
//加载驱动程序和数据库
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String url="jdbc:microsoft:sqlserver://localhost:1433;"+"DatebaseName=vipquery";
Connection loginconnection= DriverManager.getConnection(url,"sa","");


//捕获异常
}
catch(ClassNotFoundException cnfex)
{
System.err.print("装载jdbc:odbc 失败");
cnfex.printStackTrace();
System.exit(1);
}

为一个按钮点击 执行事件 但在 加载的时候 抛出 异常
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)  at java.security.AccessController.doPrivileged(Native Method)  at java.net.URLClassLoader.findClass(URLClassLoader.java:186)  at java.lang.ClassLoader.loadClass(ClassLoader.java:299)  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)  at java.lang.ClassLoader.loadClass(ClassLoader.java:255)  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)  at java.lang.Class.forName0(Native Method)  at java.lang.Class.forName(Class.java:140)  at tr.Frame1.jButton3_actionPerformed(Frame1.java:84)  at tr.Frame1_jButton3_actionAdapter.actionPerformed(Frame1.java:125)  at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)  at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)  at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)  at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)  at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)  at java.awt.Component.processMouseEvent(Component.java:5093)  at java.awt.Component.processEvent(Component.java:4890)  at java.awt.Container.processEvent(Container.java:1566)  at java.awt.Component.dispatchEventImpl(Component.java:3598)  at java.awt.Container.dispatchEventImpl(Container.java:1623)  at java.awt.Component.dispatchEvent(Component.java:3439)  at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)  at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)  at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)  at java.awt.Container.dispatchEventImpl(Container.java:1609)  at java.awt.Window.dispatchEventImpl(Window.java:1585)  at java.awt.Component.dispatchEvent(Component.java:3439)  at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)  at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)  at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
我分析的问题是数据库 加载 不上 因为 我 发现 import com.microsoft.* 找不到 但我不知道怎么加载上去 请教





话题树型展开
人气 标题 作者 字数 发贴时间
4754 sqlserver 加载不了 不知道 为什么 请教 athen 2809 2005-01-28 00:14

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923