Sub ADOTest()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim cnStr As String
cnStr = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;" & _
"IMEX=2;" & _
"DATABASE=http://SharePointServerURL;" & _
"LIST=ListName or ListGUID;" & _
"VIEW=ViewGUID;"
'IMEX=1 ReadOnly
cn.Open cnStr
rs.Open "Select * From XXX where ID=1;", cn, adOpenKeyset, adLockOptimistic
rs.Update rs(1).Name, 1
rs.Close: Set rs = Nothing
cn.Close: Set cn = Nothing
End Sub
0 件のコメント:
コメントを投稿