"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
news:Xn**********************************@127.0.0. 1...
"MP" <No****@Thanks.comwrote in
news:45***********************@news.nationwide.net :
vb6, dao, mdb, win2k (no access)
db.Execute "Update " & TABLE_NAME & " Set fldMark = 'unassigned'"
Always do
db.Execute strSQL, dbFailOnError
and then have an error handler for it.
Also, you can check the .RecordsAffected property of the db
variable, and then compare that to the number of records in the
actual table to be sure that all of them have been updated.
That's what i've done
no errors
no update (one record only - out of 38 total)
fwiw the properties of the one field...in case that shows anything strange
about that field (i have no idea if it does or not)
fldMark Props0: Value Value: 2
fldMark Props1: Attributes Value: 34
fldMark Props2: CollatingOrder Value: 1033
fldMark Props3: Type Value: 10
fldMark Props4: Name Value: fldMark
fldMark Props5: OrdinalPosition Value: 4
fldMark Props6: Size Value: 255
fldMark Props7: SourceField Value: fldMark
fldMark Props8: SourceTable Value: tblTypeCond
fldMark Props9: ValidateOnSet Value: False
fldMark Props10: DataUpdatable Value: True
fldMark Props11: ForeignName Value: can't retrieve
fldMark Props12: DefaultValue Value:
fldMark Props13: ValidationRule Value:
fldMark Props14: ValidationText Value:
fldMark Props15: Required Value: False
fldMark Props16: AllowZeroLength Value: False
fldMark Props17: FieldSize Value: can't retrieve
fldMark Props18: OriginalValue Value: can't retrieve
fldMark Props19: VisibleValue Value: can't retrieve
got the one problem field and properties thus
(just hard coded the '2' in there cause that 's the one that's "bad"
sSqlRead = "Select fldTypeName, fldCondName, fldCondVar, fldLength, fldMark
From " & TABLE_NAME & " WHERE FldMark = '2' order by fldTypeName,
fldCondName, fldCondVar, fldLength, fldMark "
Set oRs = db.OpenRecordset(sSqlRead)
If Not oRs Is Nothing Then
oRs.MoveFirst
While Not oRs.EOF
For Each oFld In oRs.Fields
For i = 0 To oFld.Properties.Count - 1
sRpt = sRpt & oFld.Name & " Props" & i & ": " &
oFld.Properties(i).Name
'temporarily override normal error handler in routine(normally don't use
resume next!!!)
On Error Resume Next
sRpt = sRpt & vbTab & "Value: <" &
CStr(oFld.Properties(i).Value) & ">" & vbCrLf
If Err Then
sRpt = sRpt & vbTab & "Value: can't retrieve" &
vbCrLf
End If
'reset error handler
On Error GoTo 0
Next i
sRpt = sRpt & "Next fld"
Next oFld
oRs.MoveNext
Wend