Set Recordset Type of QueryDef via VBA

主宰稳场 提交于 2019-12-04 05:40:21

问题


I can set the Recordset Type of a select query in Access (2002) by opening the query in design view, opening its property sheet, and changing the Recordset Type property to one of three values:

  • Dynaset
  • Dynaset (Inconsistent Updates)
  • Snapshot

I can't figure out how to set the property through VBA, though. Am I missing something obvious?


回答1:


I am not sure about this:

Dim qdf As QueryDef

Set qdf = CurrentDb.CreateQueryDef("test", "select * from atable")
qdf.Properties.Append qdf.CreateProperty("RecordsetType", dbByte, 2)


来源:https://stackoverflow.com/questions/4685261/set-recordset-type-of-querydef-via-vba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!