title: Sybase stored procedure through JDBC
body: <p>This one has baffled me for a long time, so I am trying to get some help here :)</p>
  
  <p>I am using JDBC to connect to an age old Sybase Adaptive server 6 (!!!)
  I couldn't even find the JDBC drivers for it online, so I copied them from the installation directory :)</p>
  
  <p>Now, inserting and querying and all the rest of the db operations work fine, but I encounter problems when calling a stored procedure. Let's start first with a snippet of code:</p>
  
  <pre><code>CallableStatement loginProcedure = connection.prepareCall("{call Login}");
  loginProcedure.executeUpdate();
  </code></pre>
  
  <p>This is some normal procedure calling code. I must add that the Login procedure does not take any paramaters nor it outputs something back. The only thing that it does is to create a varibale in the db named AiCol. I will update this post soon with the procedure code as well.</p>
  
  <p>When executing the above code I get the standard syntax exception:</p>
  
  <pre><code>com.sybase.jdbc.SybSQLException: ASA Error -131: Syntax error near 'Login'
      at com.sybase.tds.Tds.processEed(Tds.java)
      at com.sybase.tds.Tds.nextResult(Tds.java)
      at com.sybase.jdbc.ResultGetter.nextResult(ResultGetter.java)
      at com.sybase.jdbc.SybStatement.nextResult(SybStatement.java)
      at com.sybase.jdbc.SybStatement.executeLoop(SybStatement.java)
      at com.sybase.jdbc.SybCallableStatement.execute(SybCallableStatement.java)
  </code></pre>
  
  <p>Anyone encountered this problem before? It is my first time calling a stored procedure with no IN/OUT parameters, so I might be doing something wrong :/</p>
  
  <p>Thanks in advance!
  /ivo</p>