llmclaughlin
Programmer
Changing vb6 inline sql to stored procedures, having problem with query where the recordset needs to be editable.
Below is current code:
adoProbeVials.CursorLocation = adUseClient
adoProbeVials.Open strSQL, adoConnection, adOpenDynamic, adLockBatchOptimistic, adCmdText
New code
adoCmd.ActiveConnection = adoConnection
adoCmd.CommandText = "{CALL LIMS.ALIQUOT_WORKLIST.get_PROBEVIALS(?,?)}"
adoCmd.CommandType = adCmdText
adoCmd.Parameters.Append adoCmd.CreateParameter("inNAME", adVarChar, adParamInput, 2000, adoRS(2))
adoCmd.Parameters.Append adoCmd.CreateParameter("inVOLUME", adVarChar, adParamInput, 2000, strVolumeMin)
adoProbeVials.CursorLocation = adUseClient
adoProbeVials.CursorType = adOpenDynamic
adoProbeVials.LockType = adLockBatchOptimistic
Set adoProbeVials = adoCmd.Execute()
The new code does not work when it gets to this.
adoProbeVials(3).Value = dblVolume
Get error that table is not editable.
Any suggestions
Thanks
Louie
Below is current code:
adoProbeVials.CursorLocation = adUseClient
adoProbeVials.Open strSQL, adoConnection, adOpenDynamic, adLockBatchOptimistic, adCmdText
New code
adoCmd.ActiveConnection = adoConnection
adoCmd.CommandText = "{CALL LIMS.ALIQUOT_WORKLIST.get_PROBEVIALS(?,?)}"
adoCmd.CommandType = adCmdText
adoCmd.Parameters.Append adoCmd.CreateParameter("inNAME", adVarChar, adParamInput, 2000, adoRS(2))
adoCmd.Parameters.Append adoCmd.CreateParameter("inVOLUME", adVarChar, adParamInput, 2000, strVolumeMin)
adoProbeVials.CursorLocation = adUseClient
adoProbeVials.CursorType = adOpenDynamic
adoProbeVials.LockType = adLockBatchOptimistic
Set adoProbeVials = adoCmd.Execute()
The new code does not work when it gets to this.
adoProbeVials(3).Value = dblVolume
Get error that table is not editable.
Any suggestions
Thanks
Louie