For Programmers: Free Programming Magazines  


Home > Archive > Java Help > January 2008 > I need help using xlsjdbc









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author I need help using xlsjdbc
sahm

2008-01-06, 8:15 am

Hi evey one
I'm using xlsjdbc to read xls file but it would not work whit me and
no error massage is showing can any one help me please
this is my code

/////////////////////////////////////
try
{
Class.forName("org.aarboard.jdbc.xls.XlsDriver");
Connection con =
DriverManager.getConnection("jdbc:aarboard:xls:E://Data");
Statement stat = con.createStatement();
ResultSet result = stat.executeQuery("select * from
Adresse");
int i = 0;
while (result.next())
{
jTable1.setValueAt(result.getString("First Name"), i,
0);
jTable1.setValueAt(result.getString("Secand Name"), i,
1);
jTable1.setValueAt(result.getString("Famliy Name"), i,
2);

i++;
}

result.close();
stat.close();
con.close();
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
please show me where is my error

Best
Salim
Andrew Thompson

2008-01-06, 7:19 pm

On Jan 6, 10:22=A0pm, sahm <sahm...@gmail.com> wrote:
> Hi evey one


Please refrain from multi-posting, in future.

(N.B. X.-post to c.l.j.p./h., w/ f-u to c.l.j.h. only)

--
Andrew T.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com