MOSS MAN

Paul Zanbaka

Creating a small application from a Sharepoint Portal 2003 List

created by Anonymous on Sunday, September 09, 2007 2:13 PM

 I will describe the steps you need to Create a small application from a Sharepoint Portal 2003 List. This will really come handy when your boss ask you to tweak A SPS list or if you just want to cut development time into 25% on a small straight forward app.

Create the list for help on this search the site on creating a list, and populate some items.
For this Example the list name will be “BlueDog”

Now the tricky part connect trough Enterprise Manager or Query Analyzer to the _SITE db. Run this query on WebParts Table
SELECT     *
FROM         WebParts
WHERE     (tp_DisplayName LIKE '%Blue Dog%')

Copy the tp_ListId field. In this example we will use this value for it>

All your data for this web part resides in the User Data Table. Since you already populated some fields. Run this Query on the UserData Table

SELECT     *
FROM         UserData
WHERE     (tp_ListId = '{1D2648E5-DDEB-4545-BF4D-E5B016C74156}')


You may want to create a view for your WebPart Data with you naming the fields using As.
See below:
CREATE VIEW dbo.View
AS
SELECT     nvarchar1 AS MyField1, nvarchar2 AS MyField2, datetime2 AS MyDate1,                      nvarchar3 AS Completed, tp_ID, tp_Modified AS Modified, tp_Created AS Created,
                      tp_HasAttachment AS HasAttachment
FROM         dbo.UserData
WHERE     (tp_ListId = '{1D2648E5-DDEB-4545-BF4D-E5B016C74156}')


This is it now you can create a whole application  based on this view.

2 Final Warnings:

First, Be very careful not to modify the field types in SPS this will affect the fields in your view.You may have to re-inspect your queries if you do.
Secondly, We do not know what Microsoft will do in the next version of SPS will they change their schema therefore destroying your Application Humm??
If you work for Microsoft Please answer me!.

Filed under:

Comments

No Comments