The ADO Save menthod is giving me a fit! I'm using a disconnected recordset. I create all the fields and data types of the fields from a configuration file. I can add data, delete data, change data, all with no problems.
The problem comes in when it's time to save the data. I give it a filename just like the documentation says and then it saves the file. However, the documentation also states that if the file already exists, don't pass the filename to the save rounine again. So I check to see if the file is there and it if is, I just as rs.Save. Else I say rs.Save strFilename.
The problem is, sometimes it works, sometimes it doesn't. I was wondering if the recordset has to be in a certain mode or state before I can save it.
I have it opened using a client-side cursor. I have it set for update batch mode. Locking is adLockBatchOptimistic.
The recordset is bound to the Infragistics Ultragrid. Since I don't want to mess with what the user is doing, I clone the recordset and then save it. Then I destroy the cloned recordset.
Before I do the save I do an UpdateBatch to be sure that all pending updates are commited.
Anyone else had problems like this with disconnected recordsets?
Thanks,
Snaggs
tribesaddict@swbell.net
Life can only be understood backwards; but it must be lived forwards.
The problem comes in when it's time to save the data. I give it a filename just like the documentation says and then it saves the file. However, the documentation also states that if the file already exists, don't pass the filename to the save rounine again. So I check to see if the file is there and it if is, I just as rs.Save. Else I say rs.Save strFilename.
The problem is, sometimes it works, sometimes it doesn't. I was wondering if the recordset has to be in a certain mode or state before I can save it.
I have it opened using a client-side cursor. I have it set for update batch mode. Locking is adLockBatchOptimistic.
The recordset is bound to the Infragistics Ultragrid. Since I don't want to mess with what the user is doing, I clone the recordset and then save it. Then I destroy the cloned recordset.
Before I do the save I do an UpdateBatch to be sure that all pending updates are commited.
Anyone else had problems like this with disconnected recordsets?
Thanks,
Snaggs
tribesaddict@swbell.net
Life can only be understood backwards; but it must be lived forwards.