The coding below is part of my program, when i run my program, it only
executes until it prints out error and doesnt execute my SQL line to insert
the relevant data into the database..And when i compile, there is no error
to it...Can anyone help me debug if there is something that i type wrong?
And when i compile, there is no error to it...
if(input[i][0].equals("NM")==true )
{
for(int j =1;j<2;j++)
{
System.out.println("Inserting " + input[i][j]+ " into Database ..\t");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String dataSourceName = "mdbTEST";
String dbURL = "jdbc:odbc:" + dataSourceName;
Connection con = DriverManager.getConnection(dbURL, "","");
System.out.println("Con Established..");
s = con.createStatement();
System.out.println("error");
s.executeUpdate("INSERT INTO " + TABLE_NAME + " (Name) VALUES ('"+ input[i]
[j] + "')");
rs.next();
System.out.println("error2");
}//end for
}//end if
Robert Klemme - 28 Feb 2005 11:11 GMT
> The coding below is part of my program, when i run my program, it only
> executes until it prints out error and doesnt execute my SQL line to insert
[quoted text clipped - 23 lines]
>
> }//end if
The code is far from complete. Please post complete code and use proper
indentation.
Regards
robert