[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
] [
Newsgroup Home
]
[news.eclipse.rt.eclipselink] Problem while executing the stored procedure
From
:
navuluri.kondal@xxxxxxxxx
(kondal )
Date
: Wed, 29 Apr 2009 06:13:35 +0000 (UTC)
Newsgroups
:
eclipse.rt.eclipselink
Organization
: Eclipse
User-agent
: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi,
I have a simple procedure in SQLServer database.While I am executing the procedure using EclipseLink JPA I am getting some errors.
Project project = new Project();
DatabaseLogin login = new DatabaseLogin();
login.setUserName(DATABASE_USERNAME);
login.setPassword(DATABASE_PASSWORD);
login.setConnectionString(DATABASE_URL);
login.setDriverClassName(DATABASE_DRIVER);
login.setDatabaseName("testdemo22");
project.setDatasourceLogin(login);
Session s = project.createDatabaseSession();
s.setLogLevel(SessionLog.FINE);
((DatabaseSession)s).login();
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("insert_user");//procedure name
DataModifyQuery query = new DataModifyQuery();
query.setCall(call);
s.executeQuery(query);
When I run this code I am gettting the folllowing errors.
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'PROCEDURE'.
Error Code: 156
Call: EXECUTE PROCEDURE insert_user()
Query: DataModifyQuery()
Exception in thread "main" Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'PROCEDURE'.
Error Code: 156
Call: EXECUTE PROCEDURE insert_user()
Query: DataModifyQuery()
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:313)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:757)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:823)
Any Ideas please?
Regards kondal
Follow-Ups
:
[news.eclipse.rt.eclipselink] Re: Problem while executing the stored procedure
From:
James
Prev by Date:
[news.eclipse.rt.eclipselink] Help using the Dynamic JPA
Next by Date:
[news.eclipse.rt.eclipselink] Re: EclipseLink+Spring+ComboPooledDataSource+MySQL ORM not persisting
Previous by thread:
[news.eclipse.rt.eclipselink] Help using the Dynamic JPA
Next by thread:
[news.eclipse.rt.eclipselink] Re: Problem while executing the stored procedure
Index(es):
Date
Thread