EverActive
Programmer
I am getting is error in JBuilder I am using java version 1.5.0_03-b07 and JBuilder 2005 Foundation.
here is the code:
<code>
public String[] headings(ResultSet query){
int numbcols=0;
String error[] = new String[5];
try{
ResultSetMetaData bob = query.getMetaData();
numbcols = bob.getColumnCount();
String[] returns = new String[numbcols];
for (int i=1; i<=numbcols ; i++){
returns[i-1]= bob.getColumnLabel(i);// <--error
}
return returns;
}catch(Exception ex){ System.err.println("Error in headings: " + ex); return error;}
}
</code>
"data.java": cannot find symbol; symbol : method getColumnLabel(int), location: interface java.sql.ResultSetMetaData at line 105, column 30
The imports are:
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.io.*;
import java.lang.*;
Any help would be extremely appreciated.
Thx
here is the code:
<code>
public String[] headings(ResultSet query){
int numbcols=0;
String error[] = new String[5];
try{
ResultSetMetaData bob = query.getMetaData();
numbcols = bob.getColumnCount();
String[] returns = new String[numbcols];
for (int i=1; i<=numbcols ; i++){
returns[i-1]= bob.getColumnLabel(i);// <--error
}
return returns;
}catch(Exception ex){ System.err.println("Error in headings: " + ex); return error;}
}
</code>
"data.java": cannot find symbol; symbol : method getColumnLabel(int), location: interface java.sql.ResultSetMetaData at line 105, column 30
The imports are:
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.io.*;
import java.lang.*;
Any help would be extremely appreciated.
Thx