Executing a stored procedure in DB connector returns -1?

Hi   I am using the Db conenctor to execute a store procedure to a SQL server. When executing the same stuff on the server I see that the affected rows are 0, so i expect 0 when doing the same execution query from within Mendix app. But I receive -1 as result back. Looking into the Java code indicates;    * Returns a string representation of this action      */     @Override     public java.lang.String toString()     {         return "ExecuteStatement";     } * Returns a string representation of this action */ @Override public java.lang.String toString() { return "ExecuteStatement"; } So based on this I still do expect 0. Any one an idea why I receive -1 ? a - getting no coonection from data source ? tracing at the lognode does say that Mendix does get connection from data source for jdbx url en user b - it takes too long for Mendix to wait, so therefore he thinks he dont receive anything, and therefore nothing = -1? c- ...?
1 answers

Hi Enzo,

The section which returns the number of rows affected is the following:

	public java.lang.Long executeAction() throws Exception
	  return connector.executeStatement(jdbcUrl, userName, password, sql);

I think the -1 value is a return code provided by the sql server indicating some error with your stored procedure. From what I could find on "-1" it means object is missing.

So if you say it returns 0 when you manually execute the procedure, then you could check if everything is correct regarding your security settings, so if your db user used in the connector has rights on the procedure your executing or on the tables it's adjusting.