cancel
Showing results for 
Search instead for 
Did you mean: 

Can't query, create table in WAS

Former Member
0 Kudos

hi everyone:

I encounted a problem when I query a table in WAS.

I find if I create a table by SAPDB console, then when I query that table in WAS. It always tells me "can't find that table". If I create and delpoy table by netweaver studio dictionary prospective, then I can query that table successfully in WAS. Anther thing is that I can't create a table by sql "create table..." in WAS. It always throws Exception likes below:

com.sap.sql.log.OpenSQLException: The SQL statement "CREATE TABLE "TEST2" ("C_NAME" VARCHAR(20) UNICODE DEFAULT ' ' )" 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

I think maybe SAP WAS using open sql causes those Exception. Can someone tell me how to create a table in java program when I use open sql? Can I query tables which are not deployed by NetWeaver studio dictionary?

thanks

elliot

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi,

Please take a look at the Java persistence documentation:

http://help.sap.com/saphelp_nw04/helpdata/en/87/773a55f35a65409009e87261c84eb2/frameset.htm

Regards,

Christian

Former Member
0 Kudos

Hi,

if you want to use the advantages of SQLJ, I guess you have to deploy the database dictionary via Dev Studio.

Otherwise, you can query any available table without deploying them in the studio by using the regular java.sql-classes.

Regards, Astrid