Microsoft Sharepoint Services 3.0 provide a rich Object Model to work with sharepoint data and configuration. A good introduction can be found here.
The following code creates a sharepoint list ‘Application Errors’ if it does not exists and adds a List Item into the list.
Dim oSPSite As SPSite = New SPSite(“http://aleem:14433/”)
Dim oSPWeb As SPWeb = oSPSite.OpenWeb()
Dim listFlag As Boolean = True
oSPWeb.AllowUnsafeUpdates = True
Dim oSPErrorList As SPList = Nothing
Try
oSPErrorList = oSPWeb.Lists(“Application Errors”)
Catch ex As Exception
listFlag = False
End Try
If listFlag = False Then
oSPWeb.Lists.Add(“Application Errors”, “Application
Errors”, SPListTemplateType.CustomGrid)
oSPErrorList = oSPWeb.Lists(“Application Errors”)
oSPErrorList.Fields.Add(“Error Details”,
SPFieldType.Note, True)
oSPErrorList.Update()
End If
Dim oListItem As SPListItem = oSPErrorList.Items.Add()
oListItem(“Title”) = “Application Error”
oListItem(“Error Details”) = strErrorMessage
oListItem.Update()
oSPWeb.Dispose()
oSPSite.Dispose()
Windows sharepoint Services also provide different webservices to manage its data and configuration. More information here