Vista (and Windows 7) will not let you modify data if it is in the "\Program
Files" tree. In order words, if the database you are using is in the folder
the program is normally installed and run from, it cannot modify the files
do to tighter restrictions imposed on Vista and Windows 7 and Mac OS X Lion.

Jeffrey

On Tue, Oct 11, 2011 at 7:39 AM, bhavin k <[email protected]>wrote:

> Dear Thomas,
>                    We are trying to use H2 in embedded mode in a
> small java application. The application works fine on Windows XP, but
> the same application can't insert into database (says DB in read only
> mode) when the java app runs on a Windows vista machine. We saw the
> posting of bug 311 and used the latest build of DB 1.3.160, but the
> problem is still persisting.
>
> Below is the error we are getting.
> org.h2.jdbc.JdbcSQLException: The database is read only; SQL
> statement:
> insert into Mytable (col1 ,col2)values(5,5)  [90097-153]
>        at org.h2.message.DbException.getJdbcSQLException(DbException.java:
> 327)
>        at org.h2.message.DbException.get(DbException.java:167)
>        at org.h2.message.DbException.get(DbException.java:144)
>        at org.h2.message.DbException.get(DbException.java:133)
>        at org.h2.engine.Database.checkWritingAllowed(Database.java:1616)
>        at org.h2.table.Table.checkWritingAllowed(Table.java:1042)
>        at org.h2.engine.User.hasRight(User.java:111)
>        at org.h2.engine.User.checkRight(User.java:97)
>        at org.h2.command.dml.Insert.insertRows(Insert.java:95)
>        at org.h2.command.dml.Insert.update(Insert.java:86)
>        at org.h2.command.CommandContainer.update(CommandContainer.java:69)
>        at org.h2.command.Command.executeUpdate(Command.java:212)
>        at
>
> org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:
> 143)
>        at
> org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:
> 129)
>
> Can you please provide some insights on how to resolve it.
> We are not getting the error on Vista if we run the database on some
> other machine in server mode and app connects to it in client server
> mode. Error comes only when DB is run in embedded mode only on Vista
> machines.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to