Article View: borland.public.cppbuilder.database.ado
Article #487Re: To use ODBC or ADO?
From: Arnie
Date: Wed, 17 Aug 2005 16:30
Date: Wed, 17 Aug 2005 16:30
60 lines
3197 bytes
3197 bytes
"Foo Tze Wan" <twfoo@nospam.com> wrote in message news:4302e629@newsgroups.borland.com... > Hi all, > ... snip ... > 1) This is the most important question I would like to know: > > I would like to avoid the BDE. Using the TDatabase and TTables > components as > of now, are they equivalent to saying that BDE is also > implicitly being > used? The BCB help file mention the following for the TTable > description - > "Use TTable to access data in a single database table using the > Borland > Database Engine (BDE)". > Does it mean by using TTables or even TDatabase, I would also > need to > incorporate the BDE when the project is ready for deployment? Yes, TDatabase and friends are based on the BDE. I would STRONGLY recommend that you stay away from the BDE. I would also recommend that you stay away from xxxTable component. It was originally used for file based DBs such as DBase and should not be used with current DB servers. It always pulls all table records over to the client and does filtering there. Using a WHERE clause in a SELECT statement allows the DB server to do the filtering. A TADOQuery or TADODataset is the way to go here. The TADOQuery is fairly close to compatible to a TQuery. > > 2) The second question is: My application would still like to > retain the > ODBC features in order to support databases that are > ODBC-compliant. I think > I read in one of the postings that it may still be possible to > use ODBC over > ADO (not sure if this is the correct term to use). I have not > explored the > ADO components yet, but will try to do so. In the meantime, can > I know if it > is advisable to use this concept of "ODBC over ADO" for my > requirement? It's more like "ADO over ODBC", and yes, you can do it, though most will recommend against it. MS provides an OLEDB driver for "generic ODBC". It can be used with Borland's ADO. You'd probably be better off using the OLEDB provider supplied by the manufacturer if you support other DBs. If you go with ADO, you'll have to do sime fiddling with the query or dataset properties in order to get good performance. These include cursor location and type as well as locking mode and cache size. > Thanks in advance, > Tze Wan HTH, - Arnie
Technical Details
Message-ID:
<43036726@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.moat.net!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4302e629@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,814166c1bc0fe9b5 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Arnie" <none> Newsgroups: borland.public.cppbuilder.database.ado References: <4302e629@newsgroups.borland.com> Subject: Re: To use ODBC or ADO? Date: Wed, 17 Aug 2005 12:30:50 -0400 Lines: 62 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 24.151.53.204 Message-ID: <43036726@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124296486 24.151.53.204 (17 Aug 2005 09:34:46 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.maxwell.syr.edu!news.moat.net!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail