当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: ejb 怎么用datasource连接oracle 数据库呀?只说个大概就行!分sessionbean 和entitybean两种? ......
    摘要: 专家,问问关于sql server的sqldmo!!! ================== 我用企业管理器生成了sql server数据库的脚本! 放在查询分析器或osql都可以正常执行,但是在ado里面 按go标准分开执行却不行!总是出现错误! 用osql可以达到目的,但是要与我的软件结合,控制 一个dos的应用程序不是很好! 我想到sqldmo,不知道sqldmo是否可以实现象osq......


,APPLET中出现的问题,谢谢

我在Jbuilder中学习创建一个APPLET,用于访问SQLSERVER数据库,在JBUILDER中编译通过并能正常运行,用IE浏览器打开,出现以下错误:  
  java.lang.NoClassDefFoundError:com/borland/dx/dataset/DataSet  
        at   java.lang.Class.GetDeclaredConstructors0(Native   Method)  
        ....  
  我的IE浏览器装有JAVA   2   1.4.1  
  初学者,请各位指点,谢谢!  
   
  以下是源码:  
  import   java.awt.*;  
  import   java.awt.event.*;  
  import   java.applet.*;  
  import   com.borland.dx.sql.dataset.*;  
  import   com.borland.dbswing.*;  
  import   javax.swing.*;  
  import   com.borland.dx.dataset.*;  
   
  /**  
    *   <p>Title:   </p>  
    *   <p>Description:   </p>  
    *   <p>Copyright:   Copyright   (c)   2003</p>  
    *   <p>Company:   </p>  
    *   @author   not   attributable  
    *   @version   1.0  
    */  
   
  public   class   Applet1   extends   Applet   {  
      private   boolean   isStandalone   =   false;  
      Database   database1   =   new   Database();  
      QueryDataSet   queryDataSet1   =   new   QueryDataSet();  
      BorderLayout   borderLayout1   =   new   BorderLayout();  
      JdbNavToolBar   jdbNavToolBar1   =   new   JdbNavToolBar();  
      JTabbedPane   jTabbedPane1   =   new   JTabbedPane();  
      JPanel   jPanel1   =   new   JPanel();  
      JPanel   列表   =   new   JPanel();  
      BorderLayout   borderLayout2   =   new   BorderLayout();  
      TableScrollPane   tableScrollPane1   =   new   TableScrollPane();  
      JdbTable   jdbTable1   =   new   JdbTable();  
      GridBagLayout   gridBagLayout1   =   new   GridBagLayout();  
      JdbLabel   jdbLabel1   =   new   JdbLabel();  
      JdbTextField   jdbTextField1   =   new   JdbTextField();  
      JdbLabel   jdbLabel2   =   new   JdbLabel();  
      JdbTextField   jdbTextField2   =   new   JdbTextField();  
      //Get   a   parameter   value  
      public   String   getParameter(String   key,   String   def)   {  
          return   isStandalone   ?   System.getProperty(key,   def)   :  
              (getParameter(key)   !=   null   ?   getParameter(key)   :   def);  
      }  
   
      //Construct   the   applet  
      public   Applet1()   {  
      }  
      //Initialize   the   applet  
      public   void   init()   {  
          try   {  
              jbInit();  
          }  
          catch(Exception   e)   {  
              e.printStackTrace();  
          }  
      }  
      //Component   initialization  
      private   void   jbInit()   throws   Exception   {  
          this.setLayout(borderLayout1);  
          queryDataSet1.setQuery(new   com.borland.dx.sql.dataset.QueryDescriptor(database1,   "SELECT    
   
  Customers.CustomerID,Customers.CompanyName,Customers.ContactName,Customers.ContactTitle  
   
  ,Custom"   +  
               
   
  "ers.Address,Customers.City,Customers.Region,Customers.PostalCode,Customers.Country,Custome  
   
  rs.Phone,Cu"   +  
              "stomers.Fax   FROM   Northwind.dbo.Customers",   null,   true,   Load.ALL));  
          database1.setConnection(new   com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:odbc:sql",    
   
  "sa",   "",   false,   "sun.jdbc.odbc.JdbcOdbcDriver"));  
          database1.setDatabaseName("");  
          jdbNavToolBar1.setFocusedDataSet(queryDataSet1);  
          列表.setLayout(borderLayout2);  
          jPanel1.setLayout(gridBagLayout1);  
          jPanel1.setBorder(BorderFactory.createLineBorder(Color.black));  
          jPanel1.setDebugGraphicsOptions(DebugGraphics.LOG_OPTION);  
          jPanel1.setMinimumSize(new   Dimension(4,   4));  
          jPanel1.setPreferredSize(new   Dimension(560,   463));  
          jdbLabel1.setText("jdbLabel1");  
          jdbTextField1.setText("jdbTextField1");  
          jdbTextField1.setColumnName("CompanyName");  
          jdbTextField1.setDataSet(queryDataSet1);  
          jdbLabel2.setText("jdbLabel2");  
          jdbTextField2.setText("jdbTextField2");  
          jdbTextField2.setColumns(0);  
          jdbTextField2.setColumnName("ContactName");  
          jdbTextField2.setDataSet(queryDataSet1);  
          jdbTable1.setDataSet(queryDataSet1);  
          this.add(jdbNavToolBar1,   BorderLayout.NORTH);  
          this.add(jTabbedPane1,   BorderLayout.CENTER);  
          jTabbedPane1.add(列表,       "列表");  
          列表.add(tableScrollPane1,   BorderLayout.CENTER);  
          tableScrollPane1.getViewport().add(jdbTable1,   null);  
          jTabbedPane1.add(jPanel1,           "详细记录");  
          jPanel1.add(jdbTextField1,                                               new   GridBagConstraints(1,   0,   1,   1,   0.0,   0.0  
                          ,GridBagConstraints.WEST,   GridBagConstraints.NONE,   new   Insets(0,   0,   0,   35),   18,   0));  
          jPanel1.add(jdbLabel1,                                                     new   GridBagConstraints(0,   0,   1,   1,   0.0,   0.0  
                          ,GridBagConstraints.WEST,   GridBagConstraints.NONE,   new   Insets(0,   0,   0,   2),   42,   5));  
          jPanel1.add(jdbLabel2,         new   GridBagConstraints(0,   1,   1,   1,   0.0,   0.0  
                          ,GridBagConstraints.CENTER,   GridBagConstraints.NONE,   new   Insets(0,   0,   0,   57),   0,   0));  
          jPanel1.add(jdbTextField2,     new   GridBagConstraints(1,   1,   1,   1,   0.0,   0.0  
                          ,GridBagConstraints.WEST,   GridBagConstraints.NONE,   new   Insets(0,   0,   0,   0),   0,   0));  
      }  
      //Get   Applet   information  
      public   String   getAppletInfo()   {  
          return   "Applet   Information";  
      }  
      //Get   parameter   info  
      public   String[][]   getParameterInfo()   {  
          return   null;  
      }  
  }

NO.1   作者: helpall

wizards-->archieve   builder

NO.2   作者: leejidongdong

类似这样地  
  <html>  
  <head>  
  <title>  
  JM-CRM   专员用户界面  
  </title>  
  </head>  
  <body   >  
  <applet  
      codebase   =   "."  
      code           =   "crm.crmApplet.class"  
      archive     =   "myjmcrm.jar,dx.jar,dbswing.jar,jds.jar,jdsserver.jar,jdsremote.jar"  
      name           =   "TestApplet"  
      align         =   "center"  
      width         =   "600"  
      height       =   "474"  
      hspace       =   "0"  
      vspace       =   "0"  
      align         =   "middle"  
  >  
  </applet>  
  </body>  
  </html>  
 


 ·多表查询分组    »显示摘要«
    摘要: 有多个表 结构相同 例如 1 id name uptime pic . . . n id name uptime pic 现在要按照name 分组统计, sql语句怎么写 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE