Nikolay,
is it possible to retrieve a ""recordset"" from SharePoint ?
I am assuming access database can be easily converted to SharePoint repository.
Therefore I also assume code to sequel query access database must have an equivalent to sequel query SharePoint repository.
using the code I posted above, how would it be modified to cater for a SharePoint data repository ?
Can SharePoint data be queried via VBA code from Visio? or, is data linking to SharePoint only accomplished via binding ?
I know it wouldn't look like the following code, but I write the example to explain my curiosity.
----------------------------------------------------------------------------------------------------------------------------------------------
Public Function Test()
Dim myarray As Variant
Dim db As SharePoint <<<<<<< declare as SharePoint
Dim rstsource As Recordset
Dim num, R As Integer
'' target the database
Set db = SharePointEngine.sharepoint( "DB.accdb") '<<<<<<<<<<<Identify the Data location
Set rstsource = SharePoint("SELECT Data.Forename, Data.Lastname, Data.ShapeID " & _ ''pull the selected data into a record set
"FROM Data;")
num = EnumerateSet(rstsource) 'determines how many entries in the recordset
ReDim myarray(num, 3) '' 6) ''set the dimensions of the array
R = 1
'' iterate through the recordset transfering the contents into array
If rstsource.RecordCount > 0 Then
With rstsource
' load array with Recordset.
.MoveFirst
Do While Not .EOF
myarray(R, 0) = !Forename
myarray(R, 1) = !lastname
myarray(R, 2) = !ShapeID
R = R + 1
.MoveNext
Loop
End With
End If
frmTest.ListBox1.ColumnWidths = "42.5 pt;42.5 pt;42.5 pt;"
frmTest.ListBox1.List = myarray ''<<<<<<<< load the listbox with the contents of the array
End Function