Populating a sharepoint list through direct ddatabase connec
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Populating a sharepoint list through direct ddatabase connec

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development
Author Message
mriska
Guest





Posted: Tue Jan 11, 2005 8:51 pm    Post subject: Populating a sharepoint list through direct ddatabase connec Reply with quote

I was thinking about populating a sharepoint list by doing direct inserts
into the UserData table in the _SITE database. I did some quick test, and
this seems to work, but is there any reason you can think of why I should not
take this road? Of course I would need to know the tp_ListID and the
tp_SiteID, but they are not going to change are they? It also seems as if I
would need to know which fields in the database (nvarchar1...) corresponds to
which columns in the list, but that should also not change once set up.

I guess an alternative way would be to do it through the object model, but
if it is possible (and safe) to do it this way I could get by with a simple
SQL-job that gets executed once per day.
Back to top
Gary A. Bushey [MVP]
Guest





Posted: Tue Jan 11, 2005 9:18 pm    Post subject: Re: Populating a sharepoint list through direct ddatabase co Reply with quote

The big reason is that there is no guarantee the database schema will always
be the same (a service pack could change it), or that you did not miss a
field in another database that needs to be set. I strongly suggest using
the API for this.

--
Gary A. Bushey
SPS MVP
bushey@mindspring.com
"mriska" <mriska@discussions.microsoft.com> wrote in message
news:5BB121CD-7E7F-4FF4-A95C-74C49C4D198C@microsoft.com...
Quote:
I was thinking about populating a sharepoint list by doing direct inserts
into the UserData table in the _SITE database. I did some quick test, and
this seems to work, but is there any reason you can think of why I should
not
take this road? Of course I would need to know the tp_ListID and the
tp_SiteID, but they are not going to change are they? It also seems as if
I
would need to know which fields in the database (nvarchar1...) corresponds
to
which columns in the list, but that should also not change once set up.

I guess an alternative way would be to do it through the object model, but
if it is possible (and safe) to do it this way I could get by with a
simple
SQL-job that gets executed once per day.
Back to top
Lisa Parris
Guest





Posted: Thu Jan 13, 2005 1:49 pm    Post subject: Re: Populating a sharepoint list through direct ddatabase co Reply with quote

There are other ramifications of doing this as well. For instance, when you
add items through the GUI it doesn't just update the UserData table. It also
updates the Lists table's ItemCount and NextAvailableID columns. I haven't
delved in too deeply here but I'm sure there are other issues may not be
immediately apparent.


"mriska" <mriska@discussions.microsoft.com> wrote in message
news:5BB121CD-7E7F-4FF4-A95C-74C49C4D198C@microsoft.com...
Quote:
I was thinking about populating a sharepoint list by doing direct inserts
into the UserData table in the _SITE database. I did some quick test, and
this seems to work, but is there any reason you can think of why I should
not
take this road? Of course I would need to know the tp_ListID and the
tp_SiteID, but they are not going to change are they? It also seems as if
I
would need to know which fields in the database (nvarchar1...) corresponds
to
which columns in the list, but that should also not change once set up.

I guess an alternative way would be to do it through the object model, but
if it is possible (and safe) to do it this way I could get by with a
simple
SQL-job that gets executed once per day.
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB