on 07-08-2005 9:57 AM
Hi,
I am trying to create tables in javadictionary(MaxDB)using my WebDynpro application.I tried creating tables using SQLJ and JDBC.But I was not able to do it.I can select and insert data into already created tables.
Whwn I tried creating a table using JDBC I encountered the following exception.
com.sap.sql.log.OpenSQLException: The SQL statement "CREATE TABLE TMP_DEPID (DEPID varchar(10) NOT NULL,DEPNAME VARCHAR(25))" contains the syntax error[s]: Open SQL syntax error: CREATE ... TABLE is not supported
SQL syntax error: "VARCHAR" is a reserved keyword and cannot be used as an unquoted identifier
Does this mean that creating tables is not supported?
Can anyone help me in this matter?
Thanks in advance,
regards
~Pradeep Shetty
Hi Pradeep,
Yes, OpenSQL does not support creation of tables. But why would you need to create tables at runtime?! The natural way is to create the model at design time of your application, i.e. with the Java DataDictionary.
However, if for any reason you really need to create database tables at runtime, you can achieve this by using a non-OpenSQL datasource, e.g. you could create a VendorSQL one and use it to obtain JDBC connections in your app. See also http://help.sap.com/saphelp_nw04/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm.
Hope that helps!
Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vladimir,
Thank you for your prompt reply.
If I use VendorSQL then the application will be database specific,which I don't want.
I want to create tables at runtime because at design time I'm not aware of the no.of cols,datatype of each field,what is the primary key etc.
Is there any solution for this problem?
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.