[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KDE DB and addressbook
From:       Bavo De Ridder <bavo () ace ! ulyssis ! student ! kuleuven ! ac ! be>
Date:       1999-04-08 8:50:02
[Download RAW message or body]

Hello,

For clearing the case with KDE DB (OLE DB on KDE). Let me give you the example
for the addressbook.

KDE DB consists of a few major interfaces: Enumerators (enumerate datasources),
Datasource, Session, Command, RowSet, ...

In OLE DB not every datasource is obliged to implement full querying
possibilities. So lets assume the addressbook datasource isn't able do process
queries, it can only return a full rowset of every address available:

[this is a major point of KDE DB: SQL datasources will expose SQL queries, LDAP
datasources some kind of LDAP queries, text-file databases no query at all,
....]

KDE::DB::DataSource dataSource = new DataSource( myEnumartor.Current() );

KDE::DB::Session session = dataSource.getDefaultSession();

KDE::DB::Command command = session.getDefaultCommand();

KDE::DB::Rowset result = command.execute();

while address = result.next()
{
	// process address
}

With KDE::DB it would be this simple, off course, the creation of Sessions,
Commands, ... will be somehow different in the final release. I just conpacted
things for brevity.


BDR

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic