[jboss-user] [EJB 3.0] - Re: [JDBCExceptionReporter]'last_insert_id' is not a recogni

pakhi do-not-reply at jboss.com
Fri Jun 15 05:32:38 EDT 2007


Hi, I ve been reading your issues, and I am also finiding a similar issue in my application. I am jus trying to insert in one table in whihc one field in Identity"Id".  
My Entity Bean is like follows:


	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column (name="id")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

and my table contains this field id as set to IDENTITY....

then also i m getting this error...

sed by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'last_insert_id' is not a recognized function name.
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
14:18:36,232 ERROR [STDERR] 	at com.microsoft.jdbc.base.BaseStatement.executeQuery

Has anyone tried to look into such Entitiy insertion...

Please reply... I ve been looking into it for so long...
THanks alot...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054662#4054662

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054662



More information about the jboss-user mailing list