Finding the GUID for a Sharepoint Access DB for a SQL insert statement

jscranton

Well-known Member
Joined
May 30, 2011
Messages
707
I recently tweaked some code to connect to an access DB on Sharepoint with VBA using the connection strings here: SharePoint Connection String Samples - ConnectionStrings.com

The connection is working fine but I am getting an error with the insert statement. I think the problem is the GUID which I pulled from the Database Documentation in the Access Database Tools (once I launched the table from Sharepoint). Is there a way to check to see if this is the correct GUID for a sharepoint access table? I have found all sorts of instructions for Sharepoint Lists but not tables.



Code:
strSQL = "INSERT INTO table (Reviewer, FeedbackDate, Project) " & _
    "VALUES (" & txtReviewer & ", " & txtFeedbackDate & ", " & _
    txtProject & ")"

    Debug.Print strSQL
  
    strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;WSS; IMEX=0;RetrieveIDS=Yes;" & "Database=" & URL & ";table={F86062BB-3445-4B1E-9B72-00B10BAA05C6}; "
  
    Debug.Print strConnection
    Set cnn = New ADODB.Connection
    cnn.Open strConnection
    cnn.Execute strSQL, lngSuccess
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,223,714
Messages
6,174,049
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top