Hi people. I have a time and attendance module in VB6 which saves transactions (ADO) in MS-SQL if there is a LAN connection, and save it locally (MS Access) when offline. The trigger is when someone logged in. This is what I did:

Set cn = New ADODB.Connection
cn.Open SQLConnectionString
If Err.Number Then
   'Save it locally in MS-Access
   Set lcn = New ADODB.Connection
   lcn.Open LocalConnectionString
Else
   'Save it in MS-SQL
Endif

The problem is, if the LAN failed, it takes so long before the transaction is saved locally. What is the best way to do it?

Thank you very much. The function did great.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.