Hi,

I am working on client server architecture which interacts with a database.
I am trying to create a database,which contains information about files.
This database has only one table ,which would store this info.
Table contains the following fields.

typedef enum TDbFieldNames
{
/** generic file information */
EDbFieldFileName,
EDbFieldFileCompletePath,
EDbFieldFileSize,
EDbFieldFileFormat,
EDbFieldFileCreationTime,
EDbFieldFileModificationTime,
};

I would like this database to be accessed through a client/server interface only and not directly.

i.e, multiple applications could access this database through a client/server framework.
If an Application wants some info,it would call client's interface,which in turn would talk to the server.
server would then do a querry into the database and get this info.

Server cannot predict which all fields the client wants info for.
The querries are not predetermined/cached.

App1 could ask for "select filename,filesize ,creationtime,modificationtime from table where size = 1024
App2 could ask for "select filename,creationtime,modificationtime from table where format = 'video'

I was thinking of a client interface/method to handle the querries from Application,
which would take a buffer from client,the list of fields he is asking for and the condtion which should be executed by database to retrieve the record.

I am assuming the condition which the client specifies is "eqalto" only,that means only one rowset is returned.

Application would know how much buffer space to allocate,from the list of fields it's querring for,as its aware the max size each field would take.

The problem I am facing is,what type this buffer should be,
because at the server end the result of the querry could contain an int and a text and a real number,
or in some other querry it could be a text and a text and a int.

Discriptor's cannot be used as buffer's to store integer values(they need to converted to discriptor's),since the client might have querried for a field which is of type integer.

I want the readfrom database client interface to be generic.

What sort of buffer,client should create and call the client interface.
How to send this buffer to server from client.
If the result of the querry contains an integer or real,
How could it be written into the buffer an integer as an integer only,a real number as real number only and sent back to client.

sarangarajan