2006-10-08 22:24:46 UTC
if ( ! Records ) {
^
UserData.java:97:
}
^
2 errors
from belove code
package demo;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.ResultSet;
public class UserData {
String firstname;
String lastname;
int countrycode;
String Dfirstname;
String printrow;
ResultSet Results;
//DB Connection related Variables
static Connection con = null;
Statement st = null;
static String URL;
static String username;
static String password;
static {
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
URL = "jdbc:mysql://localhost:3306/mbtest1";
username = "root";
password = "secret";
con = DriverManager.getConnection(URL,username,password);
} boolean Records = Results.next();
if ( ! Records ) {
System.out.println("No data returned");
}
try {
do {
DfirstnaSystem.out.println(printrow);
} while Result.next (