Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Creating new table at runtime
 

Pages: 1
LLBLGen Pro Runtime Framework
Creating new table at runtime
Page:1/1 

  Print all messages in this thread  
Poster Message
orenpeled
User



Location:

Joined on:
25-Jul-2005 09:49:44
Posted:
53 posts
# Posted on: 18-Aug-2005 08:57:50.  
Hi,

My application needs to change an Oracle schema at runtime, meaning creation of new tables, adding foreign keys etc.
Of course, I would like to have LLBLGen create for me matching entities at runtime, but this is not that important.... Wink

Anyhow, does LLBLGen support DDL?
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37196 posts
# Posted on: 18-Aug-2005 10:47:01.  
No, it doesn't support DDL as in: create new tables and automagically new .NET types are created for you Regular Smiley.

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
orenpeled
User



Location:

Joined on:
25-Jul-2005 09:49:44
Posted:
53 posts
# Posted on: 21-Aug-2005 12:37:44.  
I don't really need .NET types. I could think that having the class EntityBase2 means that I can put data into it and call a method that only creates a table in the database based on this type.

Is it possible? Or is there something else? I want to avoid SQL statements ("CREATE TABLE....."), much like when performing DML commands
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37196 posts
# Posted on: 22-Aug-2005 10:28:19.  
No that's not possible, LLBLGen Pro doesn't support creation of schema elements like tables. So you have to use DDL statements.

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
orenpeled
User



Location:

Joined on:
25-Jul-2005 09:49:44
Posted:
53 posts
# Posted on: 30-Aug-2005 08:48:08.  
OK, so here's my problem.
My application - a web-services application - uses a single DB-connection for each web-service through its lifetime.

Having a simple set of DML commands my code will be something like:

mDataAccessAdapter.OpenConnection();
mDataAccessAdapter.FetchEntity(...);
mDataAccessAdapter.SaveEntity(...);
.
.
mDataAccessAdapter.CloseConnection();

But when I need to create a new table among the DML commands, I understand that I should use either ODP directly (and open a new connection) or DataAccessAdapter.ExecuteActionQuery() (and create a new connection).

1. Is it true that in the ExecuteActionQuery case I wouldn't have to open the connection? What do the DataAccessAdapter perform behind the scene?

2. Why, anyhow, do I have to create a new connection object? Why can't the DataAccessAdapter's connection be used in some way?
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37196 posts
# Posted on: 30-Aug-2005 11:13:25.  
orenpeled wrote:
OK, so here's my problem.
My application - a web-services application - uses a single DB-connection for each web-service through its lifetime.

Having a simple set of DML commands my code will be something like:

mDataAccessAdapter.OpenConnection();
mDataAccessAdapter.FetchEntity(...);
mDataAccessAdapter.SaveEntity(...);
.
.
mDataAccessAdapter.CloseConnection();

But when I need to create a new table among the DML commands, I understand that I should use either ODP directly (and open a new connection) or DataAccessAdapter.ExecuteActionQuery() (and create a new connection).

1. Is it true that in the ExecuteActionQuery case I wouldn't have to open the connection? What do the DataAccessAdapter perform behind the scene?

Thats done behind the scenes, yes Regular Smiley

Quote:

2. Why, anyhow, do I have to create a new connection object? Why can't the DataAccessAdapter's connection be used in some way?

You don't need to create your own connection, you can order the DataAccessAdapter to create one for you.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.