Greetings,

I was able to reproduce this..

        stat.execute("create table test(id int primary key, name
varchar(255))");
        stat.execute("insert into test values(1, 'Hello')");
        stat.execute("insert into test values(2, 'World')");

        stat.execute("CREATE VIEW hello_view AS SELECT name FROM test
");
        stat.execute("INSERT INTO hello_view VALUES ('Test');");
.
.
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Feature not
supported: "VIEW"; SQL statement:
INSERT INTO hello_view VALUES ('Test'); [50100-153]

Michael

On Mar 29, 11:39 pm, Thotheolh <[email protected]> wrote:
> Hi. I noticed that insertion of data into view is not supported while
> using it via JDBC for a simple Java app.
>
> JDBC: jdbc:h2:mem (memory mode without username or password)
>
> Creating Table: CREATE TABLE IF NOT EXISTS DUMMY (UID INT PRIMARY KEY
> AUTO_INCREMENT, UNAME VARCHAR(200));
>
> Creating View: CREATE VIEW DVIEW AS SELECT * FROM DUMMY;"
>
> Insertion SQL: PreparedStatement pstmt =
> connection.prepareStatement("INSERT INTO DVIEW(UNAME) VALUES (?)");
>
> org.h2.jdbc.JdbcSQLException: Feature not supported: "VIEW"; SQL
> statement:
> INSERT INTO DVIEW(UNAME) VALUES ('kelvin') [50100-143]
>
> Would this feature be available somewhere soon ?

-- 
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