I am stuck on this after exhausting other resources. The code below does the following:
(a) creates an insert command for sql (strSQL)
(b) connects to a sharepoint site using an ADODB connection
(c) executes the sql command
This all worked when the accdb was stored locally. But once the table was moved to sharepoint, the execute command is erroring out ("Syntax Error in Insert INTO statement"). I am 99% sure that the issue is that I have the wrong GUID for the table. The connection opens fine but I can't locate the correct table.
According to these instructions, one refers to the table or list name by GUID. I pulled this GUID from the accdb documenter but still stuck:
Table={39885376-6EF9-4EF7-9D0B-E040FF2FCCC2D}
I really appreciate any help.
(a) creates an insert command for sql (strSQL)
(b) connects to a sharepoint site using an ADODB connection
(c) executes the sql command
This all worked when the accdb was stored locally. But once the table was moved to sharepoint, the execute command is erroring out ("Syntax Error in Insert INTO statement"). I am 99% sure that the issue is that I have the wrong GUID for the table. The connection opens fine but I can't locate the correct table.
According to these instructions, one refers to the table or list name by GUID. I pulled this GUID from the accdb documenter but still stuck:
Table={39885376-6EF9-4EF7-9D0B-E040FF2FCCC2D}
I really appreciate any help.
Code:
If bytContinue = vbYes Then
strSQL = "INSERT INTO Table(Reviewer, FeedbackDate, Project) " & _
"VALUES (" & txtReviewer & ", " & txtFeedbackDate & ", " & txtProject & ")"
Const URL = "[URL]https://thisconsultinggroup.com/lc/bd/drfi/Feedback%20Database/[/URL]"
strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=0;RetrieveIDS=Yes;" & "Database=" & URL & ";Table={39885376-6EF9-4EF7-9D0B-E040FF2FCCC2D};"
Set cnn = New ADODB.Connection
cnn.Open strConnection
cnn.Execute strSQL, lngSuccess
cnn.Close