Board index » delphi » Multiple database platforms with D3

Multiple database platforms with D3

I need to develop an app that is capable of using any type of
ODBC-accessable database.  I developed a prototype under Interbase, but
we will do the actual development under MS SQL Server. I need to
eventually use Interbase, Oracle, DB2, etc.  I am using Delphi 3.0 Pro.

My problem is this:

The TTable components in the prototype developed under Interbase
referenced my database tables as simply TABLE1, etc.  However, when I
moved this to MS SQL Server, I found that new TTable components
referenced my tables as dbo.TABLE1, etc.  I also found that unless I went
back in to my existing components and changed the name to dbo.TABLE1,
Delphi had problems finding any unique indexes for the tables.

If I develop under SQL Server, then all tables will be prefexed with the
object owner of "dbo.".  Will this be portable to other database
platforms?  Why should it work this way?  I expected Delphi to hide these
details from me and to isolate me from these types of problems.  Am I
doing something wrong here (perhaps some option that I haven't set
right)?

Thanks in advance for your responses.

Bruce Bukovics
FBS Software
bbukov...@compuserve.com

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

 

Re:Multiple database platforms with D3


Not sure if this helps, but I always use Delphi to create my Tables.
I just use the FieldDef editor to add them.  When I need to create
them, I just call TTable.CreateTable.  That way you can always
recreate them in case they get corrupt, etc.   And it will get rid
of your dbo. problem.

-Ben Ziegler

P.S.  If you've had luck using MS SQL Server, ODBC, and D3 Pro I'd
like to hear about it.  I keep getting access violations in IDAPI.DLL
and have no clue what to do.

Quote
bbukov...@compuserve.com wrote:

: I need to develop an app that is capable of using any type of
: ODBC-accessable database.  I developed a prototype under Interbase, but
: we will do the actual development under MS SQL Server. I need to
: eventually use Interbase, Oracle, DB2, etc.  I am using Delphi 3.0 Pro.

: My problem is this:

: The TTable components in the prototype developed under Interbase
: referenced my database tables as simply TABLE1, etc.  However, when I
: moved this to MS SQL Server, I found that new TTable components
: referenced my tables as dbo.TABLE1, etc.  I also found that unless I went
: back in to my existing components and changed the name to dbo.TABLE1,
: Delphi had problems finding any unique indexes for the tables.

: If I develop under SQL Server, then all tables will be prefexed with the
: object owner of "dbo.".  Will this be portable to other database
: platforms?  Why should it work this way?  I expected Delphi to hide these
: details from me and to isolate me from these types of problems.  Am I
: doing something wrong here (perhaps some option that I haven't set
: right)?

: Thanks in advance for your responses.

: Bruce Bukovics
: FBS Software
: bbukov...@compuserve.com

: -------------------==== Posted via Deja News ====-----------------------
:       http://www.dejanews.com/     Search, Read, Post to Usenet

Other Threads