NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: MyBrainIsFull on January 27, 2016, 06:08:11 PM
-
Hi Bruce, I am looking at NT9 Apps
you said the device (phone) can only have a small amount of data, so give Bruce North, and give Kevin South
so i make a sub set of data from my server's database in say an imdb "Bruce"
How do I get it to the device?
Can I make a Sql Lite db and send that to the device?
Do you have provision for this?
the sql db on the phone must have a login, even when disconnected
Is the sql db on the phone password protected? ie, I have a sql viewer on my phone, I can now see all the passwords.
As well as a sync of my database, can I also send the device an updated html page and maybe a new jpg?
-
Hi Kevin,
>> So i make a sub set of data from my server's database in say an imdb "Bruce"
This is not the approach I would use.
Basically I would just add a filter to the NetWebService Method, Return View, based on whatever filter was appropriate. For example;
a) Customers table. Customer is Added by a specific salesman. Only that Salesman can read and write that record.
So added a User field to Customer, simple filter on Customers table, cus:user = p_web.GSV('user')
b) Products are assigned to specific salesmen. some sell A and B, some C and D some B and C.
So we need a table (Allocated) which basically creates a multi-multi link between Salesmen and Products. (Say, Salesman, Product, Allowed). Then the View in the WebServiceMethod joins to the Allocated table, and only exports records where Allowed = true.
>> How do I get it to the device? Can I make a Sql Lite db and send that to the device? Do you have provision for this?
no. We're not talking about "databases" here, we're talking about "data". Assuming that the device supports SQLite for example reduces the options etc. The idea is to think about "data" rather than "the data store". Let each platform choose whatever datastore is appropriate for that platform. The _transfer_ of the data is completely independent of the data store.
Cheers
Bruce
-
Thanks for that Bruce
I need to express myself better.
I want to put an app in the store
When someone "buys" it, it needs to have its data at startup, disconnected, no server to access.
ie it needs to be packaged up with its starting sql lite database
it may connect much later (weeks) when it could update its database
-
discussed in webinar #91
http://www.capesoft.com/accessories/NetTalkUserGroup.htm