Hi All,
Please help about detailed offline views ;
what is the important issues while creating its ? and how would be the synchronization codes eg. from laptop to server pc ?
do a search on
HOWTO: Set Up an Offline View in Visual FoxPro
As with online data, analyze your requirements before creating offline views to determine the design of the views you will need in the offline database. Once you know the subset of data you want to use offline, you can start with an existing view or create a new view. If a view already exists that returns the records you want to use offline, you can use it, or you can create one programmatically. The view you take offline is stored in a .dbf file in the offline database container.
Note If you plan to modify data in an offline view, be sure to make the view updateable before you take it offline. Once a view is offline, you can only set its update properties programmatically; you cannot modify an offline view in the View Designer.
To use an existing view offline
Use the CREATEOFFLINE( ) function and the name of the view.
For example, if you want to go to client sites to update accounts, add customers, and record new sales, you need the customer information as well as current orders and the online product descriptions. You might have a view called customerinfo that combines information from the Customers table, Orders table, and OrderItems table. To create the view, use this code:
CREATEOFFLINE("customerinfo")
To programmatically create a view offline
Use the CREATE SQL VIEW command, followed by the CREATEOFFLINE( ) command.
For example, the following code creates a view that displays data from the Products table and the Inventory table from the online database. Since no update criteria are specified, this view is read-only:
CREATE SQL VIEW showproducts ;
CONNECTION dsource ;
AS SELECT * FROM Products INNER JOIN Inventory ;
ON Products.ProductID = Inventory.ProductID ;
CREATEOFFLINE("showproducts")
Hi Danceman,
i've read these articles about this issue. i've additional questions ?
i am planning to use this technique when user away from office eg. via using laptop for sales,invoice records.
when user come back will update his records to the server.
at this point i've some questions
how would be the update codes from laptop to server ?
is logical that table and offline view names can be same ?
why form designs will be easy and app will located which is described path info on pathinfo.dbf or .ini etc..
or for this target is this pratically
each tables will contain 3 key field myguid ( created via guid() ) , pcname ( via sys(0) ) , recid ( via datetime() )
if this more efficient how would be the update codes from laptop to server ?
I am also designing a new system that would handle both online and offline scenarios.
So far, in design you need to visualize everything, from online scenarios to offline, how would the system function when it is online and how the system would detect the online situation then mode to offline processing if not online.
with regards to updating server tables that is online from offline data, i have designed that temp tables or offline tables would have an extra field that would hold the posted field, this field would be logical by type and holds the value, False if not yet uploaded to server and True once uploaded... the updating code would fall entirely to you....
this kind of system would require a lot of time to develop and a very creative mind to visualize everything.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.