>oConnection = createobject("ADODB.Connection") >oConnection.CursorLocation = adUseClient && required!!! >oConnection.ConnectionString = ... >oConnection.Open() > >rs = createobject("ADODB.Recordset") >rs.CursorLocation = adUseClient && required!!! >rs.Open(pcQuery, oConnection, pnCursorType, pnLockType, pnType) && options here - any vald options > >rs.ActiveConnection = .NULL. > >oConnection.Close > > >... do offline work > >oConnection.Open() >rs.ActiveConnection = oConnection > >rs.UpdateBatch adAffectAllChapters >oConnection.Close >rs.Close && here you lose all data. Reopening causes the same. >>
>> >>**TJM Offline test....Persistant >> lcRsFileName="c:\temp\styless.rs" >> oRecordset.Save(lcRsFileName) >>**make Change not possible at this point. >> >>**Go offline! >> oRecordSet.close() >> oConnection.close() >>**her the application might be shutdown >> >> >>**Here we restart application >> oConnection = CreateObject("adodb.connection") >> oConnection.Provider = "SQLOLEDB.1" >> oConnection.ConnectionString = "Persist Security Info=False;Password=quest;User ID=quest;Data Source=TJM" >> >> oRecordset = CreateObject("adodb.recordset") >> oRecordSet.CursorType = 3 &&Open Static Client default 0 >> oRecordSet.LockType = 4 &&Lock Batch Optistic default 1 >> oRecordSet.CursorLocation = 3 &&Client Side Cursor default 2 >> oRecordset.Open("c:\temp\styles.rs") >> >> **try an update >> >> oRecordSet.fields("moc001").value='assfsadfsdafasd' >> oRecordSet.updateBatch >> >> >> **Simulate closing Application >> oRecordSet.close >> >> ***try to go online >> oConnection = CreateObject("adodb.connection") >> oConnection.Provider = "SQLOLEDB.1" >> oConnection.ConnectionString = "Persist Security Info=False;Password=quest;User ID=quest;Data Source=TJM" >> oConnection.Open >> >> **Open and Save Offline Record Sets. >> oRecordset = CreateObject("adodb.recordset") >> oRecordSet.CursorType = 3 &&Open Static Client default 0 >> oRecordSet.LockType = 4 &&Lock Batch Optistic default 1 >> oRecordSet.CursorLocation = 3 &&Client Side Cursor default 2 >> oRecordset.Open("c:\temp\styles.rs") >> oRecordSet.activeconnection=oConnection >> oRecordSet.updatebatch >> >>>>