You are not logged in.
Pages: 1
Hello,
Am trying to develop a simple Client-Server DB application to which a client can connect from
a different PC using service names (no Web-browsing so no HTTP).
Was thinking that if one puts the code to generate the tables in the server-side,
then one still needs that table definition code on the Client-side
in order to perform routines for input data into the tables.
So is one supposed to write a shared unit for the DB table
definitions that gets shared by both the server and the client side
or am I missing something?
Am grateful for any pointers,
Regards
Sami
Below is a sample of the server code.
Var
aModel : TSQLModel;
aProps : TSQLDBSQLite3ConnectionProperties;
aServer : TSQLRestServerDB;
BEGIN
aProps := TSQLDBSQLite3ConnectionProperties.Create(ChangeFileExt(paramstr(0),'.db'),'','','');
Try
aModel := TSQLModel.Create(
[TSQLAuthGroup,TSQLAuthUser,
TSQLBabies,
],ROOT_NAME);
VirtualTableExternalRegisterAll(aModel,aProps);
aServer := TSQLRestServerDB.Create(aModel,'Babies.DB3',
CHECK_USERS);
Try
With aServer Do
Try
CreateMissingTables;
........
Offline
Yes, am actually using TSQLRestClientURINamedPipe to
connect on the client side, although the server and client are still
in the same PC.
The client can now successfully retrieve data from a table defined on
the server, My mistake sorry, no additional definitions are
needed on the client side, thanks for pointing this out.
I assume when the server is located physically on another PC,
this method should still operate rather fast?
Thanks a lot,
Sami
Offline
Pages: 1