Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 MS Access 2010 中有一个备注字段,我正在尝试在其中粘贴一大段文本(大约 160k 个字符)。
当我直接粘贴到表格中时,出现“文本太长无法编辑”的错误。尝试通过表单执行此操作时会发生同样的事情。
我还尝试将文本保存到文件并使用 VBA 读取文件内容,然后通过运行 UPDATE table sql 语句来更新表。在这种情况下,我收到“超出系统资源”的运行时错误 3035。
根据这篇文章,我应该能够存储 1GB 的数据,否则如何用我的文本更新备忘录字段?
您可以使用记录集来更新字段。这样,您不会超过更新查询的最大长度
(代码不完整,需要更多细节才能写出更准确的代码)
Dim str As String 'Read text file into str Dim rs As DAO.RecordSet Set rs = CurrentDb.OpenRecordset("MyTable") rs.AddNew rs.Fields("MyMemoField").Value = str rs.Update rs.Close