Exception comes from where?



Being new to SQLServer, I may be doing something very basic wrong, but here's
my problem:

Java servlet code is calling a MSSQL stored procedure, returning this error
message:
Main catch exception java.sql.SQLException: [Microsoft][SQLServer 2000
Driver for JDBC][SQLServer]Line 1: Incorrect syntax near 'insert_person'

Java code as follows:
public String dbInsertPerson(Connection conn) throws Exception {

String curErrorId = "";
CallableStatement procCall = null;
String procString = "";

// Make sure no errors have occurred.
if (curErrorId.equals("")) {
try {
procString = "{call insert_person(?,?,?,?,?,?,?,?,? )}";
procCall = conn.prepareCall(procString);

procCall.setString(1, this.lastName);
procCall.setString(2, this.firstName);
procCall.setString(3, this.middleName);
procCall.setString(4, this.preferredName);
procCall.setString(5, this.dateOfBirth);
procCall.setString(6, this.gender);
procCall.setString(7, this.emailAddress);
procCall.setString(8, this.highSchoolName);
procCall.setString(9, this.highSchoolGradYear);

procCall.executeUpdate();

}
catch (SQLException e) {
curErrorId = "100";
throw e;
}
catch (Exception e) {
curErrorId = "101";
throw e;
}
finally {
if (procCall != null) procCall.close();
}
} // end if
return curErrorId;
}

Stored procedure code as follows:

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE procedure insert_person
@lastName varchar(16),
@firstName varchar(16),
@middleName varchar(16),
@preferredName varchar(16),
@dateOfBirth varchar(30),
@gender varchar(1),
@emailAddress varchar(25),
@highSchoolName varchar(20),
@highSchoolGradYear varchar(4)
AS
insert into people (LastName, FirstName, CreationDate, LastUpdateDate,
MiddleName, PreferredName, DateOfBirth, Gender,
EmailAddress, HighSchoolName, HighSchoolGradYear)
values (@lastName, @firstName, getdate(), getDate(), @middleName,
@preferredName, convert(datetime, @dateOfBirth), @gender,
@emailAddress, @highSchoolName, @highSchoolGradYear)

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO


Would one of you non-newbies be so kind as to straighten me out?
I figure it's my ignorance/syntax issue causing some problem, whether in the
java
callable statement syntax or the stored procedure itself.
Also, a pointer to any documentation that might help me resolve future issues
on my own would be much appreciated.


.



Relevant Pages

  • Re: Why use Java Stored Procedures....
    ... Aside from Microsoft databases, most well-known databases support java ... but that is not a Stored Procedure) I ...
    (comp.databases.oracle.server)
  • TDS_RET_STATUS exception
    ... high enough the occasional deadlock can occur. ... This is ok as the java code that executed the deadlocked CallableStatement ... However, what I'm currently getting is that the first retry attempt fails, ... found for the stored procedure output parameters. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Java (JDBC) exception for already handled error from SQL Server Stored Procedure
    ... We are using Java calling one stored procedure in SQL server. ... But somehow when Java code finished execute this SP, it will still error out when trying to retrieve the output parameters. ...
    (microsoft.public.sqlserver.programming)
  • Re: Where do business rules belong... OCP and SPs
    ... problem with using a stored procedure is. ... that proc only through that interface. ... Say, in Java: ...
    (comp.object)
  • RE: No TDS_RET_STATUS was found
    ... high enough the occasional deadlock can occur. ... This is ok as the java code that executed the deadlocked CallableStatement ... what I'm currently getting is that the first retry attempt falls ... found for the stored procedure output parameters. ...
    (microsoft.public.sqlserver.jdbcdriver)