🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages Started by Jos Walrave Tue, 15 Jul 2003 06:55
advise
#512
Author: Jos Walrave
Date: Tue, 15 Jul 2003 06:55
61 lines
2975 bytes
I am a newbie. I just created this java code, for which JBuilder 8
Enterprise generates when build the following message : " Could not find the
main class.  Will exit program."

Can someone advise me on this and also on the runtime configuration settings
? I understand one can define a default setting regarding the purpose of
your code (application, etc.).

Here is my code so far:
-------------------------------------------------  >

import java.sql.*;

class loadJdbc {

    public static void main (String[] args) {
 try {
   // try/catch clause to handle exception conditions
   Connection connection = null;
   String driverName = "com.ddtek.jdbcx.sqlserver.SQLServerDriver"; //
DataDirect JDBC Driver
   String serverName = "127.0.0.1";
   String portNumber = "1433";
   String mydb = "DatabaseName=BugTracking";
   String mydatabase = serverName + ":" + portNumber + ";" + mydb;
   String url = "jdbc:datadirect:sqlserver://" + mydatabase; // DataDirect
JDBC URL (see page 19 jdbcref)
   String username = "";
   String password = "";

   // Load the JDBC driver
   Class.forName(driverName);

   // Create connection to db
   connection = DriverManager.getConnection(url,username,password);
   // Create a result set containing all data from tblPermissions
   Statement stmt = connection.createStatement();
   ResultSet rs = stmt.executeQuery("SELECT * FROM tblPermissions");
   // Fetch each row from the result set
   while (rs.next()) {
     // Get the data from the row using the column index
     String s = rs.getString(1);
     s = rs.getString("userID");
     System.out.println(s);
   }
 }
 catch (ClassNotFoundException e) {
   // Couldn't find the db driver
 }
 catch (SQLException e) {
   // Couldn't connect to the db
 }
      }
}



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003
Re: advise
#513
Author: Jos Walrave
Date: Tue, 15 Jul 2003 15:28
7 lines
1349 bytes
You don't need to reply on this one anymore. I already fixed it myself.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads