0

I open a table dataset, create a row, and then search for that row, but the row isn't found. Why not?

    Using tblAttachments As Table = gdb.OpenDataset(Of Table)("Attachments")
    Using rb As RowBuffer = tblAttachments.CreateRowBuffer()
        With rb
            .Item("ROWGUID") = ATTACH_GUID
            .Item("Filename") = Path.GetFileName(Filename)
            .Item("ATTACHMENT_BLOB") = buffer
            .Item("ATTACH_DATE") = File.GetCreationTime(Filename).ToShortDateString()
        End With
        Dim row As Row = tblAttachments.CreateRow(rb)
        row.Store()
        row.Dispose()
        row = Nothing
    End Using
' Try a querydef here to see if we can see the record we just added
Dim qf As New QueryFilter
qf.WhereClause = "ROWGUID = '" + ATTACH_GUID + "'"
Using rc As RowCursor = tblAttachments.Search(qf)
    While (rc.MoveNext())
        Debug.Print("Hello world")
    End While
End Using

End Using

0 Answers0