Private Function InsertPVRValue(ByVal tcInsertString As String, _
ByVal tcRecType As String, _
ByVal tcName As String, _
ByVal tcValue As String, _
ByVal dbsPVR_pos As Database)
Dim pcSQL As String
Dim recPVR_pos As Recordset
pcSQL = "SELECT " & _
"FR_PVR.position, FR_PVR.length, FR_PVR.value " & _
"FROM FR_PVR " & _
"WHERE FR_PVR.rectype= '" & tcRecType & "' " & _
"AND FR_PVR.name= '" & tcName & "'"
Set recPVR_pos = dbsPVR_pos.OpenRecordset(pcSQL, dbOpenSnapshot, dbReadOnly)
If recPVR_pos.RecordCount = 0 Then
MsgBox "Record not found in FR_PVR" & vbCr & _
"rectype= " & tcRecType & vbCr & _
"name= " & tcName & vbCr & _
"In: modPVRTransfer-InsertPVRValue()"
Else
Mid(tcInsertString, recPVR_pos.Fields("position").Value, recPVR_pos.Fields("length").Value) = tcValue
End If
recPVR_pos.Close
InsertPVRValue = tcInsertString
End Function
pcSQL = "SELECT FR_PVR.position, FR_PVR.length, FR_PVR.value " & _
"FROM FR_PVR " & _
"WHERE FR_PVR.rectype= 'A'" & _
"AND FR_PVR.name= 'recid'"
pcSQL = "SELECT FR_PVR.position, FR_PVR.length, FR_PVR.value " & _
"FROM FR_PVR " & _
"WHERE FR_PVR.rectype= 'Z'" & _
"AND FR_PVR.name= 'recid'"