12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

432 Day 12<br />

Figure 12.2.<br />

Database access from<br />

the perspective of a<br />

<strong>C++</strong>Builder app.<br />

TQuery<br />

TDBGrid<br />

TDatabase<br />

TTable<br />

TDatasource<br />

TDBEdit<br />

TStoredProc<br />

TDBListBox<br />

■ You do not need to use the TDatabase component to access databases. The<br />

TDatabase component provides some additional features and controls that you may<br />

or may not need, but it’s not required to build <strong>C++</strong>Builder database applications.<br />

■ You will probably not access the TSession component unless you’re develop<strong>in</strong>g<br />

multithreaded database applications. A multithreaded application opens multiple<br />

execution “pipel<strong>in</strong>es” simultaneously. This means that several operations can occur<br />

at the same time. Normal database applications are not multithreaded, so, as a rule,<br />

you won’t need to concern yourself with the TSession component. <strong>C++</strong>Builder<br />

automatically creates a TSession (stored <strong>in</strong> a global variable named Session) for<br />

database apps when they start up. This means that for s<strong>in</strong>gle-threaded apps, you<br />

can just reference the Session variable when you need access to TSession’s properties<br />

or methods.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!