女士访问记录太大-法语字符

时间:2018-10-15 09:09:00

标签: ms-access

我在那儿,我尝试了一些事情。看了这个答案:Record is too large MS Access runtime error

尝试了备注字段,压缩并修复了数据库文件,但没有任何效果。据我所知,根据https://support.office.com/en-us/article/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ocmsassetID=HA010341462&CorrelationId=49a62e69-cf72-400b-aad8-302c3b9d6ff0&ui=en-US&rs=en-US&ad=US,表格中的所有内容都可以。

所以表有87列(字母数字),有些列没有字符,其他的有200列,我很难过细分。有一些记录有超过2000个字符,但是有问题的记录只有1908个字符,除非我怀疑这可能与法语字符(重音等)有关。非常感谢您的帮助。我会尽快答复。

代码中断的部分是:

Set rs = CurrentDb.OpenRecordset("Select " & TableName & ".* FROM " & TableName & ";")
        If Not (rs.EOF And rs.BOF) Then
            rs.MoveFirst
                Do Until rs.EOF = True
                    DirName = rs!DEARNAME
                    RegNumbers = rs!REG
                    Call SurnameFinder2(DirName, RegNumbers)
                    rs.Edit
                    rs!RegSur = DirID
                    rs.Update
                    rs.MoveNext
                Loop
        Else
            MsgBox ("Import Failed")
            Exit Sub
        End If

它调用此函数:

Public Function SurnameFinder2(DirectorName, RegNo) As String
    Dim SQLInsertQuery
    Dim DirectorName2 As String
    Dim Regno3 As String
    Dim Lngstr As Long
    Dim lSpace As Long
    Dim StrName As String
    Dim Space As Long

    StrName = Trim(DirectorName)
    Lngstr = Len(StrName)
    Testing = InStrRev(StrName, " ", , vbTextCompare)
    Space = Lngstr - Testing
    Surname = Trim(Right(StrName, Space))
    DirID = RegNo & Surname

End Function

0 个答案:

没有答案