I installed OpenEdge om Wondows box. I used OEA to create a database sports2000a. I can see there is a schema PUB in this database.
Now I want to create more schemas in sports2000a using in Java code:
sql = "CREATE SCHEMA myschema";
stmt.executeUpdate(sql);
I received this error:
Driver loaded.
Connected to: jdbc:datadirect:openedge://192.168.0.125:6000;databaseName=sports2000a
connection failed with:'[DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement at or about "SCHEMA myschema" (10713)'
java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement at or about "SCHEMA myschema" (10713)
Can I create schema?
Thanks
sql = "CREATE SCHEMA myschema";
Try to put qoutes around myschema or end the SQL statement with a semicolon.
Can I create schema?
Yes.
Hi Mike,
I tried both and they fail:
create schema "myschema" or
create schema myschema;
I did this in Java JDBC code and in a SQL tool DBVisualizer.
Thanks!
Sorry my mistake... In OpenEdge you don't create schema. Users are the owner of all objects. So you'd create a user "myschema".
See http://documentation.progress.com/output/OpenEdge102b/pdfs/dmsrf/dmsrf.pdf for details.
CREATE USER works.
create user 'myschema','password'
Now I can create tables in 'myschema'.
I wonder when the password will be used.
Thanks so much!
I wonder when the password will be used.
Well, it's a user. So unless it get's revoked the user can login and access his data using the password.
I see.
Thank you so much for your help!