I just began playing with Servoy 4.0 final. I made a table and set the primary key column to db identity. When I make a simple form using this table I get the “can’t save form data” message. If I switch the primary key column so that servoy manages it all seems to work fine.
John McCann
Windows XT
Java 1.5
SQL Server 2005 express using the microsoft 1.2 JDBC driver
If you set the pk column to dbIdentity, how does it look like if you look at the database with an admin tool? It sounds like the identity property is not set right…
Patrick
The db identity is set correclty on the backend database. Seed 1 and increment 1. When one makes a request for a new record in Servoy no new row is made in the backend database. Works fine if I use a Servoy sequence.
Thanks
John McCann
You probably have an error in the log about this . Can you tell us which is it ? ( check both servoy logs of 4.0)
The console returns:
Cannot save form data
com.servoy.j2db.dataprocessing.DataException: The statement did not return a result set.
The log in workspace/.metadata does not return anything.
Is thier another log?
Thanks
John McCann
Yes there is the old servoy_log.txt . I think the error should be found there.
It did not actually create the servoy_log unless I logged on to the developer as the administrator? The servoy_log returns the following.
2008-08-19 21:40:54,224 ERROR [AWT-EventQueue-0] com.servoy.j2db.util.Debug - Throwable
com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.persistence.datasource.p.invoke(Unknown Source)
at $Proxy0.executeQuery(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:179)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:179)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:179)
at com.servoy.j2db.dataprocessing.SQLEngine.performUpdates(Unknown Source)
at com.servoy.j2db.dataprocessing.EditRecordList.a(Unknown Source)
at com.servoy.j2db.dataprocessing.EditRecordList.stopEditing(Unknown Source)
at com.servoy.j2db.cmd.o.doIt(Unknown Source)
at com.servoy.j2db.cmd.c$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Thanks
John McCann
John,
Can you try using the freetds driver instead (it comes bundled with servoy, jtds.jar)
url jdbc:jtds:sqlserver://hostname:1433/dbname
driver net.sourceforge.jtds.jdbc.Driver
Rob
Rob,
Changing drivers worked. Thanks for the advice.
John McCann