LLBLGenPro functionality?

Posts   
 
    
DavidThi808 avatar
Posts: 6
Joined: 21-Mar-2006
# Posted on: 21-Mar-2006 23:49:53   

Hi;

(note reposted here because no answer in the db section - I assume it's offtopic there.)

I am looking at using LLBLGenPro (and am asking questions before investing a day learning it by using it). I need an API where I pass a connection string which is vendor & database specific and from that point on, everything is the same classes/objects regardless of what database is underneath (Sql Server, Oracle, DB2, or MySql). Obviously the schema in each case is identical.

1) When accessing the database, are the select commands, particularly setting parameters, identical as I set them (fine if they change underneath)? Or do I have to do @param for Sql Server, : param for Oracle, etc.?

2) Is there a way to get the value of an auto-generated key back shen doing an insert? Again, without my having to create a different insert for each vendor?

3) Is there a way to enumerate (I know SqlServer can do this, and for some vendors some parts may be impossible):

a) Enumerate all servers running the database?

b) Enumerate all databases on a server?

c) Enumerate all tables, views, & stored procedures in a database?

d) Enumerate all columns in a table/view?

e) For a given vendor/server/database/username/password, create the most common connection string?

thanks - dave

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-Mar-2006 07:52:15   

1) When accessing the database, are the select commands, particularly setting parameters, identical as I set them (fine if they change underneath)? Or do I have to do @param for Sql Server, : param for Oracle, etc.?

You don't have to do anything specific to the database, this is handled by the LLBLGen Pro underneath code.

2) Is there a way to get the value of an auto-generated key back shen doing an insert? Again, without my having to create a different insert for each vendor?

Yes, by setting a flag on your save method, which re-fetches the entity back from the database.

3) Is there a way to enumerate (I know SqlServer can do this, and for some vendors some parts may be impossible):

a) Enumerate all servers running the database? b) Enumerate all databases on a server? c) Enumerate all tables, views, & stored procedures in a database? d) Enumerate all columns in a table/view?

I didn't understand if you mean at design time or at runtime.

e) For a given vendor/server/database/username/password, create the most common connection string?

The most common connection string is created for you based on the data you supply.

DavidThi808 avatar
Posts: 6
Joined: 21-Mar-2006
# Posted on: 22-Mar-2006 15:01:20   

DavidThi808 wrote:

3) Is there a way to enumerate (I know SqlServer can do this, and for some vendors some parts may be impossible):

a) Enumerate all servers running the database?

b) Enumerate all databases on a server?

c) Enumerate all tables, views, & stored procedures in a database?

d) Enumerate all columns in a table/view?

e) For a given vendor/server/database/username/password, create the most common connection string?

We need the above for a part of our program that would not use LLBLGen. We need to let user's pick any database for us to read data from (again, not using LLBLGen). For Sql Server we do steps a - e above and can prompt them using drop-down lists. And for Oracle we can do steps c & d.

But for other databases we cannot do this and so we are left requiring them to enter this information themselves which is not as user firendly. This is not a must have issue - we will eval LLBLGenPro and I am guessing we will use it. But it would be a nice feature - I think for others too.

thanks - dave

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-Mar-2006 15:39:28   

All mapped entities are enumerated in an EntityType enum.

Also per there is an enum for each entity's fields which wil be named after your entity name like: "YouEntityNameFieldIndex" enum