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!

Disconnected Recordsets?

Status
Not open for further replies.

bubarooni

Technical User
May 13, 2001
506
0
0
US
I don't know if such a thing is possible but here is my situation:

I have a program I wrote that allows our sales staff to record their customer contacts, sales, etc.

They run it off their desktops when at the office and through Citrix when they are on the road.

They don't like having to hook up to the internet and then open citrix while on the road. They want to just open up the program and write their contact info wherever they are at locally to their laptop and then want to come to the office and save that info to the server.

How in the world could I do that?
 
Set up a sync program that runs on the server to sync the databases.

 
Could you expand on that a little? I am not sure where to proceed with that.

Thanks
 
This is a good example of usinging a disconnected recordset.
The sales staff would have the current customer list pulled down to a local recordset. That recordset would have a
.CursorLocation = adUseClient
and a locktype of adLockBatchOptimistic

you disconnect from the database by setting recordset.activeconnection = nothing

Then you can use the .Save method to persist that recordset to disk, allowing the machine to be turned off. When they are on the road you .Open but give it the file name you saved to. You can do things like recordset.addnew, recordset.update.

When you get back to the office you just set up the same connection and set the .activeconnection property and do a .UpdateBatch. If you design your system well you don't get conflicts (have the clients generate primary keys that won't conflict with others). You can do this a number of ways from having the clients generate GUIDs to just allocating key ranges to sales staff to having them have a seed and incriment (sales person 1 starts off with a seed of 1 and increments by 100 each time, Sales person 2 starts off with 2 and incriments by a 100) This lets you have 100 sales people without conflicts. You can at any point change the seed and increment. You just have to set the lowest seed to the max(id) + 1.

 
Excellent! I will see what I can do with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top