Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please detailed help about offline views

Status
Not open for further replies.

kosta

Programmer
Feb 9, 2001
186
0
0
CA
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 ?

TIA

Soykan OEZCELIK
 
lot to cover, try going to 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")


Attitude is Everything
 
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 ?


TIA

Soykan OEZCELIK
 
Hi Tia,

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.
 
I meant Kosta..... not tia, something wrong with my eyes.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top