SharePoint List OLEDB
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-09-17 09:12 PM
Anyone had any luck using an OLEDB connection to a SharePoint list to perform updates? I have made a modified OLEDB Object to make a connection string "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=1;RetrieveIds=Yes; DATABASE=http://sharepoint.yourdomain.com/Documents/;LIST={5999B8A0-0C2F-4D4D-9C5A-D7B146E49698}; " and this works fine when performing select statements. When performing action statements(INSERT, UPDATE) the object hangs on the coding stage. I have tired different IMEX numbers, as this is the recommendation, but still no luck. Here is the code from the Code object
Dim command As New OleDbCommand(queryString" input SQL", moConnection"input connection" )
Try
command.ExecuteNonQuery()
Catch ex as Exception
runErr"output error"=ex.Message
End Try
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-11-17 10:18 AM
Hi Douglas,
First- set the connection, and check for the provider(i.e, ""Microsoft.Jet.OLEDB.4.0"").
Then check for the password,
If password = 'yes'
""Provider="" & [Provider] & ""; Data Source="" & [Database] & ""; Jet OLEDB:Database Password="" & [Password] &"";""
If password = 'no'
""Provider="" & [Provider] & ""; Data Source="" & [Database] & "";""
Second- open the connection, with code stage as-
If moConnection Is Nothing Then
moConnection = New OLEDBConnection(ConnectionString)
moConnection.Open()
End If
Third- use the code to execute the query-
If moConnection Is Nothing Then
Dim strcon as String
Dim path as String
path = filePath
strcon = ""Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""+path+"";Extended Properties=Excel 12.0""
moConnection = New OLEDBConnection(strcon)
moConnection.Open()
End If
Fourth- close the connection, with code stage as-
moConnection.Close()
moConnection.Dispose()
moConnection = Nothing

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-06-18 01:52 AM
Hi Douglas - when I'm doing the select even, I'm getting ""Could not find installable ISAM"" returned when opening the connection using the same format you've provided. Did you run into that error? fyi I'm in a SP 2013 on-prem environment.
