on 05-07-2005 12:01 AM
Hi:
Can anyone tell me how can I create new tables at Runtime in Web AS 6.40 J2EE Engine?
Thkns
Armando
Hi Armando,
Well, it depends on the type of your application, but generally you can get connection to the DB through the J2EE Engine default DataSource:
DataSource ds = (DataSource) initialContext.lookup("jdbc/SAP<SID>DB");
Connection conn = ds.getConnection();
and execute statement "CREATE TABLE TMP_BLA ...":
Statement st = conn.createStatement();
st.executeUpdate("CREATE TABLE TMP_BLA ...");
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,
It cannot works because the connection is Open SQL and the statement Create, alter or drop is not supported.
but thanks for the advise.
Im trying to get the connection different that datasource
thnks
Armando
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.