开发者

Set Recordset Type of QueryDef via VBA

开发者 https://www.devze.com 2023-02-04 11: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:

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?


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消