Hello, Code below returns the following error:
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
<%
Const adLockBatchOptimistic = 4
Const adUseClient = 3
strDataBase = "somedb.mdb"
set cnTraining = server.CreateObject("ADODB.Connection")
cnnstr="Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & server.mappath(strDataBase) & ";Persist Security Info=False"
cnTraining.Mode = 3
cnTraining.Open cnnstr
set rsSearch = Server.CreateObject("ADODB.Recordset")
rsSearch.CursorLocation = adUseClient
rsSearch.LockType = adLockBatchOptimistic
sSql = "some sql stmt" 'this works fine on its own
rsSearch.Open sSql, cnTraining
set rsSearch.ActiveConnection = nothing
cnTraining.Close
set cnTraining = nothing
%>
My goal is to get a disconnected recordset. The problem here occurs when i try to use the adUseClient value (3) for the CursorLocation. If I don't use a 3 in the CursorLocation it works fine. Hoewever i'm almost certain i have to use the 3 in order to disconnect the recordset. Any ideas? Is my connection string not set up properly to get a disconnected recordset?