I am having trouble executine a stored query in microsoft access. Is the syntax the same for stored queries in ms access the same as sql server. Here is the code the I am trying public DBResultSet executeStoredProcedure(String theCall ){ String[] a; Statement st; Connection c; ResultSet rs; CallableStatement cs; DBResultSet aResultSet; try{ System.out.println("Stored Procedure is \n" + theCall + "\n"); if (this.isConnected() == false ) return null; c = this.getConnection(); if ( c != null ){ cs = c.prepareCall(theCall); rs = cs.executeQuery(); System.out.println("Prepared Statement" + theCall + "\n"); }else{ System.out.println("Can not execute query. No connection"); return null; } aResultSet = new DBResultSet( rs ); cs.close(); this.connection.close(); return aResultSet; }catch(SQLException sql ){ System.out.println("SQL Exception in executeQuery"); sql.printStackTrace(); return null; } } Any help with the syntax of stored queries and ms access is appreciated ------------------
Thomas Paul
mister krabs
Ranch Hand
Joined: May 05, 2000
Posts: 13974
posted
0
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, which you agreed to when you registered, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. A single charaacter for a last name is not acceptable. Please choose a new name which meets the requirements. Thanks.
O.K Where do I change my username? Do I have to re register? Thanks for the help Brian
Originally posted by Thomas Paul: The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, which you agreed to when you registered, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. A single charaacter for a last name is not acceptable. Please choose a new name which meets the requirements. Thanks.
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
yes, just re-register with a new name. Your old name will soon be disabled.