Sharepoint and the BDC

The expensive version of Sharepoint comes with the Business Data Catalog.
This is a means of describing sql commands, stored produres and web services in such a way that Sharepoint can call them to obtain required data.

It is advised not to attempt to use Sharepoint as a high volume transactional system.
The problem is that I need to feed Sharepoint from such a system.

Use of the BDC is ideal for real time lookups of small amounts of data via direct calls.
For static data the use of web services is ideal as you can use the webserver to cache the data that will not change intra day.
However if you have large lists of data you don’t want the transactional system to be hammered with big queries.
As a result we are using a “service” application (OK it’s a GUI – but it could be a service) to update a status table and then push the data into a sharepoint list. This list will then trigger workflows.

I would have liked to use a MSMQ for this but apparently this will not work with our multiple redundant server farm.

Sharepoint – writing to a sharepoint list.

I have started to work with Sharepoint.  This is microsofts portal/integrated search platform.

It requires W2k3 server or higher to run it (and it must be installed to allow you to code against).  This means that most devlopment is performed using virtual pc’s (which is painful).

Some of the documentation is wrong. The bold line was missing from the following:

                using (SPSite oSiteCollection = new SPSite(SiteName()))

                {

                    Debug.WriteLine(oSiteCollection.ToString());

                    using (SPWeb oWebsiteRoot = oSiteCollection.OpenWeb(CoreWebName()))

                    {

                        oWebsiteRoot.AllowUnsafeUpdates = true;

                        SPList oList = oWebsiteRoot.Lists[RawMessageList()];     // Get this from a config file

 

                        SPListItem oListItem = oList.Items.Add();

                        oListItem[“Title”] = Reference;

                        oListItem[“Created”] = DateTime.Now;

                        oListItem[“Modified”] = DateTime.Now;

                        oListItem[“Author”] = AuthorId(); 

                        oListItem[“Editor”] = AuthorId(); 

 

                        oListItem[“MsgType”] = MsgType;

                        oListItem[“Reference”] = Reference;

                        oListItem[“MsgBody”] = MsgBody;

 

                        oListItem.Update();

                    }

                }

This meant that the webservice that I was writing to populate a list was failing with

The security validation for this page is invalid.

I found this article that pointed me in the correct direction.

I am using webservices to abstract the list population so that I can have applications that are not dependent upon Sharepoint yet still can still work with sharepoint.  This will allow them to be tested on any dev machine, not just our Sharepoint farm.

I hate Crystal Reports

Crystal Reports is touted as an end-user reporting tool.
Then it requires the entry of sql in it’s own twisted format.
Developers end up using a dumbed down tool.

One of the products that I work with uses Crystal Reports as a data transformation tool.
This app parses structured messages to load it’s database.
Crystal is then used to query this database to produce a report that is fed back into the application.

We have upgraded the product recently and it has updated Crystal.  The new version has lost the ability to resize the page.  You need to use the printer setup to set the print size.  Oh and the existing data has been badly squashed up to fit into an A4 page.

I am exporting data as a text file.
Yes I am using a report WYSIWYG screen painted tool to define fixed with text output.
The app then uses a pick screen to identify fields to read in.